Page 1 of 1

radio button, being selected from creation

Posted: Sat Dec 02, 2006 3:32 am
by Mythic Fr0st
Heres my problem

I have 2 radio buttons, how do I make one appear selected

E.G

Male/female button

Male O female O

how do I make Male O radio button, appear selected? so you have to change it if your a girl, but so you
cant leave it blank ?

- edit, or is their anyway to CHECK if a radio button has been selected with PHP

right now, you click sign up, it goes to the next page, and displays if username is right, password & confirm password is right, & password & confirm password match & e-mail & confirm e-mail match

is there a way like to detect if a radio button has been selected (preferably using PHP if possible, but anything else is better )

Posted: Sat Dec 02, 2006 8:08 am
by feyd
There's a property called "checked."

If neither is selected the browser will submit nothing or erroneous data. You may need isset() on the PHP side.

ty

Posted: Sat Dec 02, 2006 2:51 pm
by Mythic Fr0st
thanks