Android Programmer Learning PHP Development (11)-Form submission-phpstorm

Source: Internet
Author: User
$_get Variable

The predefined $_get variables are used to collect values from the form method= "GET".

Information sent from a form with a GET method is visible to anyone (displayed in the browser's address bar) and has a limit on the amount of information sent.

Let's take a visual look at the Fig diagram and see how this demo is implemented:


The first step:



Client.html (only one line of code):


<a href= "Server.php?name=iwanghang&age=18" >server</a>

Step Two:



server.php:

<?php    var_dump ($_get);//Print Result: Array (2) {["Name"]=> string (9) "Iwanghang" ["Age"]=> string (2) "}"}    echo "<br>";    echo $_get[' name ']. " <br> "; Print Result: Iwanghang    echo $_get[' age ']. " <br> "; Printed results: 18


--------------------------------------------------------------------------------------------------------------

Form submission:


server.php:

<!--<a href= "server.php?name=iwanghang&age=18" >server</a>--><!--form form--><form action= "server.php" method= "get" >    username:<input type= "text" name= "name" ><br>    age:< Input type= "text" name= "age" ><br>    <input type= "Submit" value= "Commit" ></form>

The above is the Android Programmer learning PHP Development (11)-Form submission-phpstorm content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!

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