PHP about request a bit of a question

Source: Internet
Author: User
$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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.