Home >Backend Development >PHP Tutorial >PHP form submission via GET method demonstration

PHP form submission via GET method demonstration

WBOY
WBOYOriginal
2016-07-25 08:44:211344browse

php submits the form demonstration through GET, $_PHP_SELF represents the current page, and php obtains the information submitted by the user through the $_GET variable

  1. if( $_GET["name"] || $_GET[ "age"] )
  2. {
  3. echo "Welcome ". $_GET['name']. "
    ";
  4. echo "You are ". $_GET['age']. " years old." ;
  5. exit();
  6. }
  7. ?>
  8. Name: < ;input type="text" name="name" />
  9. Age:
Copy code

php


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