Re: what's the matter?
| From: | Rick Emery | Date: | Sat, 22 Feb 2003 14:17:37 +0000 |
| Subject: | Re: what's the matter? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-136628@lists.php.net to get a copy of this message | ||
<?php
extract($HTTP_POST_VARS);
if($gender=='')
echo "choice the gender";
if($gender=="male")
echo "you are male";
if($gender=="female")
echo "you are female";
?>
----- Original Message -----
From: "X" <e_guo123d@163.com>
To: <php-general@lists.php.net>
Sent: Saturday, February 22, 2003 7:36 AM
Subject: [PHP] what's the matter?
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!
thank u!~