RE: [PHP-DB] Re: Checkboxes in a table
| From: | Ford, Mike [LSS] | Date: | Sat, 21 Aug 2004 00:57:19 +0000 |
| Subject: | RE: [PHP-DB] Re: Checkboxes in a table | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-35826@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Jasper Howard
> Sent: 21/08/04 00:49
>
> just set the checked value of the check boxes to something like,
> "true", and when you are going through the check boxes in the second
> script do something like this:
Urrr -- you script will only ever see checkboxes which are checked -- unchecked ones won't be
trnsmitted. So just foreach() over the received array, and the indexes you see are for the checked
boxes:
foreach ($_POST['checkbox'] as $key=>$irrelevant):
// checkbox[$key] was checked
endif;
Cheers!
Mike