Im trying to process a form that has a unique name value which is not an array but have been unsuccessful in grabbing the value. When i view the page source i see this;
<input type=checkbox name=select0 value=$user>
<input type=checkbox name=select1 value=$user>
<input type=checkbox name=select2 value=$user>
<input type=checkbox name=select3 value=$user>
I have tried many combinations of a loop but the value is always blank. At least when i try to echo or print it too the script is does not return a value so i cant tell if its really working.
I tried something like this.
for($i=0;$i<=$_POST['select'];$i++)
{
if ( isset($_POST["select$i"] ) ) {
print $_POST["select$i"]." is checked.<br/>";
}
}
This does not seem to work and im not sure why. I placed some exit statements in the code to see if it drops out of the loop somewhere and found the the statement
if ( isset($_POST["select$i"] ) ) {
is completely bypassed. I dont understand why. I tried using $_GET as well, Same results. It just cant see the fact that the checkbox has been checked on the form.