Re: Dummy question about knowing marked checkboxes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux