Re: checkboxes help ?
| From: | Matt McClanahan | Date: | Fri, 17 Nov 2000 22:13:37 +0000 |
| Subject: | Re: checkboxes help ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-25967@lists.php.net to get a copy of this message | ||
On Fri, 17 Nov 2000, Gianni wrote:
> Hi I have a form for companies to fill out. Amongst other things, I
> have 18 checkboxes for different areas of service.
>
> I have called them prog_focus, prog_focus1 etc etc and the value would
> be Primary Education, Secondary Education etc etc.
>
> I would like to be able to fill in a '.' or soemthing in the db fields
> of the checkboxes not selected. How can I do that ?
Checkboxes that aren't checked will not be defined when the form is
submitted. So, to see if a checkbox wasn't checked, you would use an
if(isset()) on the name of the checkbox.
if (!isset($prog_focus1))
// Checkbox wasn't checked
Matt