are $_post and $_get redundant?

Source: Internet
Author: User
are $_post and $_get redundant?
PHP seems to be able to automatically get the data for a post or GET request, without having to use a $_post or $_get array to get it. For example:
$userName =$_post["UserName"];
$PS =$_post["PS"];
echo "The user name you entered is:". $userName;
echo "
The password you entered is: ". $PS;
?>
Even if the code $_post those two lines out still can get to the form data, then I think $_post and $_get is redundant, and I think this is the biggest difference between PHP and ASP, ASP without request collection is absolutely not get

Share to:


------Solution--------------------
That's because you opened the register_globals. But Register_globals is to be turned off to be safe, you write code like this, not good.
------Solution--------------------
Which website did you open the register_globals?

I'm going to have a text
Xxx.php?username=abc&ps=1
xxx.php?username=abc&ps=2
Xxx.php?username=abc&ps=3
......
xxx.php?username=abc&ps=999999

This is more convenient than 999,999 post, although post is not difficult
If you have a post, upload something that's more fun.

  • 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.