Re: array + checkbox
| From: | Bjorn Van Simaeys | Date: | Wed, 08 Aug 2001 17:11:53 +0000 |
| Subject: | Re: array + checkbox | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-61869@lists.php.net to get a copy of this message | ||
Hey Colin,
You will need some javascript to handle the checkbox'
onchange event because when the user clicks the
checkbox off and back on, the value will be 'on' - and
your if-condition will not work!
Greetz,
Bjorn Van Simaeys
www.bvsenterprises.com
--- Colin Viebrock <colin@easydns.com> wrote:
> > If( strcmp($voorraad[1],'on') == 0 )
> > // it's checked
> > else
> > // it's not
>
> Alternatively, fix your HTML by using quotes and a
> value attribute:
>
> <INPUT TYPE="checkbox" name="voorraad"
> value="something" checked>
>
> Then:
>
> if ($voorraad=='something') {
> // checked
> }
>
>
> - Colin
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail:
> php-general-unsubscribe@lists.php.net
> For additional commands, e-mail:
> php-general-help@lists.php.net
> To contact the list administrators, e-mail:
> php-list-admin@lists.php.net
>
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/