Home  >  Article  >  Backend Development  >  Android programmers learn PHP development (11)-Form submission-PhpStorm

Android programmers learn PHP development (11)-Form submission-PhpStorm

黄舟
黄舟Original
2017-03-02 10:07:171204browse

$_GET Variable

#The predefined $_GET variable is used to collect values ​​from the form with method="get".

The information sent from the form with the GET method is visible to anyone (will be displayed in the browser's address bar), and is There is also a limit to the amount of information.

Let’s take a look at the FIG animation intuitively, and then see how to implement this Demo:


Step one:



##client.html (only one line of code ):


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

Step 2:



##server.php:

<?php
    var_dump($_GET); // 打印结果:array(2) { ["name"]=> string(9) "iwanghang" ["age"]=> string(2) "10" }
    echo "<br>";
    echo $_GET[&#39;name&#39;]."<br>"; // 打印结果:iwanghang
    echo $_GET[&#39;age&#39;]."<br>"; // 打印结果:18


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

Form submission:


server.php:




username:
age:

The above is the content of Android programmers learning PHP development (11)-Form submission-PhpStorm. For more related content, please pay attention to the PHP Chinese website (www .php.cn)!


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn