|
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
|
|