Re: GET values from Checkboxes
| From: | Analysis & Solutions | Date: | Fri, 15 Mar 2002 04:25:41 +0000 |
| Subject: | Re: GET values from Checkboxes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88621@lists.php.net to get a copy of this message | ||
Hey Daniel:
> When I have Textboxes I can retrieve their values whne the method POST is
> used by the $HTTP_POST_VARS['name_of_the_textbox']
Here's a sample form:
<form>
<input name="Doms[]" type="checkbox" value="foo.biz" />
<input name="Doms[]" type="checkbox" value="foo.com" />
<input name="Doms[]" type="checkbox" value="foo.info" />
<input name="Doms[]" type="checkbox" value="foo.net" />
<input name="Doms[]" type="checkbox" value="foo.org" />
</form>
When you submit it, the boxes that are checked off go into the $Doms[]
array. Those which aren't checked don't. The array's key will be
numerical, starting at 0. The array's values will the the values of the
checkbox, ie "foo.com"
Enjoy,
--Dan
--
PHP scripts that make your job easier
http://www.analysisandsolutions.com/code/
SQL Solution | Layout Solution | Form Solution
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y