Re: radio buttons checked or not
| From: | Andy B | Date: | Wed, 07 Apr 2004 20:28:18 +0000 |
| Subject: | Re: radio buttons checked or not | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-182702@lists.php.net to get a copy of this message | ||
----- Original Message -----
From: "Daniel Clark" <dclark@nwlink.com>
To: "Andy B" <aborka1@wmis.net>
Cc: <php-general@lists.php.net>
Sent: Wednesday, April 07, 2004 4:22 PM
Subject: Re: [PHP] radio buttons checked or not
> My understanding is if the variable "exists" then the radio button was
> checked.
>
>
> > i have this code:
> > <?if($old['Type']=="Annual"){?>
> > <input type="radio" name="eventtype"
> > value="Annual"checked
> > accesskey="y">Yes
> > <?}else {?>
> > <input type="radio" name="eventtype" value="OneTime"
> > checked
> > accesskey="n">No<?}?>
> > was just wondering if that was the right way to determine the state of a
> > radio button...?
> > if the value of $old['Type']="Annual" then the yes button is
checked...if
> > not then the no button is checked instead...
>
nope..its pulled out of a db... its a field name called Type and its ENUM
('Annual', 'OneTime') and i have to load all of the record back into the
form so it can be changed and put back into the table