Chris Grigor wrote:
morning all,
Is there an easier way of doing the following??
form1 submitting to form1.php
<input type="checkbox" name="1">
<input type="checkbox" name="2">
<input type="submit>
make this into:
<input type="checkbox" name="blah[1]" value="1">
<input type="checkbox" name="blah[2]" value="1">
then you can:
foreach($_POST['blah'] as $p => $x) {
if (!isset($_POST['blah'][$p])) {
echo "item $p was not selected";
} else {
echo "item $p was selected";
}
}
--
Postgresql & php tutorials
http://www.designmagick.com/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php