Home >Backend Development >PHP Tutorial >PHP submit form information code example through POST method

PHP submit form information code example through POST method

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

PHP code example for submitting form information through POST. In PHP, the information from the form post is obtained through the $_POST variable. $_PHP_SELF represents the current page

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

php, POST


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