Hi,
I'm at a conference that is using a form in a website that I developed, and for some reason the form is not accepting the value of the checkbox when it is selected.
It used to work fine, and apparently I did something within the past few days that has an effect on it, but have no idea what that could have been.
Here is the code that is in the script...
$acceptance is a field value that is retrieved from the DB that indicates whether they hace accepted the TOS on the webite.. It is either 'Y' or 'N'
As you might guess, they need to check the box to go further into the site.
When you check the box and submit, the value remains 'N'... And I don't know why.
Am I missing something very obvious???
Note * Form is opened earlier in the script
<?php // if acceptance is not == 'Y' then display this
if ($acceptance != 'Y') {
?>
<tr>
<td class="form_field" valign="bottom">
<input type="checkbox" name="accept" value='Y'>
</td>
<td align="left" class="BmediG">
By checking this box, you are indicating that you have read and accept the terms and conditions as defined in the following link
<br>
<a href="terms_agreement.php" target="_blank" title="Terms and Conditions" class="Bbold">
<img src="images/15green_chrome_star.png" width="15" height="15">
Terms and Conditions
<img src="images/15green_chrome_star.png" width="15" height="15">
</a>
<br>
</td>
</tr>
<?php
}else{
print"<input type=\"hidden\" name=\"accept\" value=\"".$acceptance."\">";
}
?>
<tr>
<td align="right"> </td>
<td align="left"><input type="submit" name="update" value="Update Record" /></td>
</tr>
</table>
</form>
Any feedback would be greatly appreciated, as I have hundreds of people trying to access their back office and the only way for them to do that at this point is for me to manually update the DB in their record with the 'Y'
Thank You in advance.
Douglas