FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Radio value?

 


UnikeViruz
<INPUT type="radio" name="1">General
how would I get the value of this?
$test = $_POST['1']; ?????
Also if they must check one of the boxes....how would i make sure of it?
Rhysige
you add value= just like yo have name etc.
krazycapital
Here is a code example:
Code:
<input type="radio" name="group_name" value="1"><br />
<input type="radio" name="group_name" value="2"><br />
<input type="radio" name="group_name" value="3"><br />

To check it:
Code:
if (isset($_POST[group_name])) {
echo "One of them was checked in";
} else {
echo "None of them were checked in";
}
UnikeViruz
Thanks crazy , Helped alot Laughing
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.