index.php: <form action="x.php" method="post">choice your gender <input type="radio" name="gender" value="male"> male <input type="radio" name="gender" value="female">female <input type="submit"> </form>
x.php: <?php if($gender=='') echo "choice the gender"; if($gender=="male") echo "you are male"; if($gender=="female") echo "you are female"; ?>
but at last it said that the gender had not been defined???
help me!
"by your command." ( a 'please' would be nice, X!)
Since PHP 4.1 form data are not automatically available as variables in the followup file.
http://nl.php.net/release_4_1_0.php explains it all, for now it's enough to say - either turn register_globals on in php.ini (google knows how) - or read $_POST['gender'], e.g. $gender=$_POST['gender'];
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

