Re: Dummy question about knowing marked checkboxes
| From: | info at globalissa dot com | Date: | Mon, 30 May 2005 19:51:34 +0000 |
| Subject: | Re: Dummy question about knowing marked checkboxes | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-216006@lists.php.net to get a copy of this message | ||
The name property currrently set as the value of name='interesses' ... should be different
for each different checkbox. Then you test for the value of 'on' or 'off'. If
the checkbox is checked then the default value will be 'on'.
In your code you have set values but those are not strictly necessary because if no value is
declared then 'on' or 'off' are used. Perhaps you may consider using the values
Alojamento, Artesanato and Eventos for the names instead like this?
Example:
Alojamento <input name='alojamento' type='checkbox'>
Artesanato <input name='artesanato' type='checkbox'>
Eventos <input name='eventos' type='checkbox'>
Here's a basic checkbox article which may help:
http://www.globalissa.com/articles/articleCheckbox.php
Rob
http://www.globalissa.com
===
with reference to:
snip
My dummy question, for which i apologise once more is: after submitting the form, how can i know
which chekboxes were checked ?
Thanking you in advance.
Warm Regards,
Mário Gamito