Re: what's the matter?

From: Date: Sat, 22 Feb 2003 14:03:40 +0000
Subject: Re: what's the matter?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-136624@lists.php.net to get a copy of this message
At 14:36 22-2-2003, you wrote:
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'];

« previous php.general (#136624) next »