Re: Selected Radio Buttons
| From: | Jordan Elver | Date: | Sat, 14 Apr 2001 20:14:11 +0000 |
| Subject: | Re: Selected Radio Buttons | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-48583@lists.php.net to get a copy of this message | ||
Hi,
The $article_active comes from a session and I want be able to select the
radio button (which ever one, yes or no) when the user comes back to the page.
I think thats a bit clearer :-)
Jord
On Saturday 14 April 2001 15:12, you wrote:
> I'm not sure I understand. In the first loop you are seing if
> $article_active equals y. And no where in the code do you set
> $article_active to anything else.
>
> Why would you think $article_active would be anything but "y" or "n"?
>
>
> --
> Plutarck
> Should be working on something...
> ....but forgot what it was.
>
>
> "Jordan Elver" <jord.elver@virginnet.co.uk> wrote in message
> news:01041415474000.10298@localhost...
>
> > Hi,
> > I think I'm being stupid. Why won't this code work. The $article_active
> > variable is showing y when I echo it?
> >
> >
> > if($article_active == 'y') {
> > echo"<INPUT TYPE=\"radio\" NAME=\"active\"
> > VALUE=\"y\" SELECTED>Yes";
> > } else {
> > echo"<INPUT TYPE=\"radio\" NAME=\"active\"
> > VALUE=\"y\">Yes";
> > }
> >
> > if($article_active == 'n') {
> > echo"<INPUT TYPE=\"radio\" NAME=\"active\"
> > VALUE=\"n\" SELECTED>No";
> > } else {
> > echo"<INPUT TYPE=\"radio\" NAME=\"active\"
> > VALUE=\"n\">No";
> > }
> >
> >
> > Thanks,
> >
> > Jord
> >
> > --
> > 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