Darkwoods Posted October 25, 2010 Share Posted October 25, 2010 Hey in my edit page i have 2 radio buttons in my form and i need to make sure the same value is still selected how can i do that? thanks Quote Link to comment Share on other sites More sharing options...
vichu.1985 Posted October 25, 2010 Share Posted October 25, 2010 Dude, Try with this <form name="test" action="submit.php" method="post"> <?php $selected = 1; // it will be queried value if($selected == 1){ echo '<INPUT TYPE=RADIO NAME="size" VALUE="1" CHECKED >one<BR> <INPUT TYPE=RADIO NAME="size" VALUE="2">two<BR>'; } else{ echo '<INPUT TYPE=RADIO NAME="size" VALUE="1">one<BR> <INPUT TYPE=RADIO NAME="size" VALUE="2" CHECKED >two<BR>'; } ?> </form> Quote Link to comment Share on other sites More sharing options...
Darkwoods Posted October 25, 2010 Author Share Posted October 25, 2010 thanks this is great Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.