Subject: posting an array from checkboxes
Posted By: harpua Post Date: 1/13/2006 4:05:32 PM
Can somebody tell me why this works, I have a form with checkboxes and when I send the checked values in a form to a completely different page they read without using a
$_POST['checkbx_test']

Page 1.
<form action="testform.php" method="post" name="GroupB">
<input type="checkbox" name="checkbx_test[]" value="1" />1<br />
<input type="checkbox" name="checkbx_test[]" value="2" />2<br />
<input type="checkbox" name="checkbx_test[]" value="3" />3<br />
<input type="checkbox" name="checkbx_test[]" value="4" />4<br />
<input type="checkbox" name="checkbx_test[]" value="5" />5<br />
<input type="submit" value="Submit" />
</form>


Page 2.
while (list ($key,$val) = @each ($checkbx_test)) {
    echo $val . "<BR>";
}

Thank You
MIke

Go to topic 38696

Return to index page 396
Return to index page 395
Return to index page 394
Return to index page 393
Return to index page 392
Return to index page 391
Return to index page 390
Return to index page 389
Return to index page 388
Return to index page 387