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

黄舟
Release: 2023-03-06 09:58:01
Original
1217 people have browsed it

$_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>
Copy after login

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
Copy after login


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

Form submission:


server.php:




username:
age:
Copy after login

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)!


Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template