Re: multiple checkbox help
| From: | Thomas Seifert | Date: | Mon, 31 May 2004 14:57:21 +0000 |
| Subject: | Re: multiple checkbox help | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187278@lists.php.net to get a copy of this message | ||
On Mon, 31 May 2004 10:50:52 -0400 bjlockie@lockie.ca (Bob Lockie) wrote:
> I tried this HTML:
> <input name="deleteID" value="1" type="checkbox">
> <input name="deleteID" value="2" type="checkbox">
>
> $_REQUEST['deleteID'] === the last box checked.
> so I did a google search and changed my HTML to:
>
> <input name="deleteID[]" value="1" type="checkbox">
> <input name="deleteID[]" value="2" type="checkbox">
>
> Now the code:
> for ($i = 0; $i < count($_REQUEST['deleteID']); $i++){
> echo "deleting '" . $value . "'";
> }
> has the right count but how do I get the values out?
echo "deleting '" . $_REQUEST['deleteID'][$i] . "'";
regards,
thomas