$doing =$_request[' doing '];
Switch ($doing)
{
Case "Yingwen":
if (Isset ($_request[' 中文版 '))
{echo "Don't come out";
} else
{echo "Please enter English";}
Break
Case "Zhongwen":
if (isset ($_request[' Chinese '))
{echo "Don't come out";
} else
{echo "Please enter Chinese";}
Break
}
?>
??????????????????????????????????????????????????????
<title>Online dictionaries</title>
??????????????????????????????????????????????????????
I'm confused when I did not fill out, just click the Submit button PHP can also receive data, output "Don't come out" why? I judged that if I did not receive the data, I would output else, but why would he never execute it?
Reply to discussion (solution)
I think it's going to output "don't come out." Take a good look. Echo $doing echo $_request[' doing ') see results
$_request will receive both post and get!
Form control nput type= "text" Whether or not there is a value, will be committed
After submission, of course, it is defined.
if (Isset ($_request[' 中文版 ')) should read
if (! empty ($_request[' 中文版 ')))
Other similar
I'm not sure I can tell you the details. I doing here with a hidden field to determine the value of doing if doing is Yingwen receive engilsh, and then determine if Chinese is there, so what is wrong?
Thank you for the moderator, understand. I always thought that without a value, he wouldn't have filed it.