I have a text field and two checkbox, i need to list users based on the selection.... can anyone show me an example....
+1
A:
See:
http://stackoverflow.com/questions/1082152/enumerate-all-check-box-in-php
<input name="rows[]" value="someVal" type="checkbox" />
<input name="rows[]" value="anotherVal" type="checkbox" />
<?php
// $_POST['rows'] contains the values of all checked checkboxes
//if something has been checked
if(isset($_POST['rows'])) {
//loop over each checked value
foreach ($_POST['rows'] as $row) {
echo $row . '<br />';
}
}
?>
karim79
2009-07-09 08:36:17
Don't forget to test isset($_POST['rows']) in case none are checked
Greg
2009-07-09 08:47:35
A:
if (isset($_POST['mycheckbox']))
{
draw_selectionCheckboxChecked();
}
else
{
draw_NoCheckbox();
}
rikh
2009-07-09 08:37:37