If someone's updating a form, and I want their last settings to appear in a
the correct radio button, I use this:
<input type"Radio" name="I_like" <? if ($I_like == "PHP") { echo "CHECKED" }
?>>
<input type"Radio" name="I_like" <? if ($I_like == "ASP") { echo "CHECKED" }
?>>
So, on a form with a Radio button asking which you prefer, the one that
they've voted for before is the default button to be checked.
Oh, and I know that's probably messy :)
If you want to get the results, you'd print
The user liked <? echo "$I_like"; ?>!
James.
Hello,
I have sometging like this:
<input type="Radio" name="radio1" value=<? echo $opt1 ?>">Opt1
how I know if some user choose some radiobutton???
I tried if($opt1) , but without success....
T.Y.
Miguel Loureiro <[EMAIL PROTECTED] >
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]