Hello;
Been scratchin my head on this one. I have to do simple checkbox validation without JS and I thought the following code inside of my form would give me the checkbox value. However when I click submit no value is displayed for the $box variable.
$box=$_POST['BoxValue'];
echo $box; //no value gets displayed after submit pressed.
<form>
<input type=\"checkbox\" name=\"BoxValue\" value=1>
</form> // form is submitted to $ _SERVER['PhP_SELF'].
This is the only checkbox in the form. The other elements of the form display with no issues so am I missing something with checkboxes ?
I am only concerned that the user clicked the checkbox. Again this is the only form element that doesn't post to the page.