User Output Form processing PHP

Source: Internet
Author: User
Tags php form

PHP form input processing, I use two files in Linux output: touch php_post1.html php_post1.php

The php_post1.html code is as follows:

1 <!DOCTYPE HTML>2 <HTML>3 <Head>4 <title>Post Mode data submission</title>5 <Metahttp-equiv= "Content-type"content= "text/html"CharSet= "Utf-8"/>6 </Head>7 <Body>8 <form method= "POST" action= "php_post1.php" >9Name:<inputtype= "text"name= "FName"/>Ten <BR/> OneAge:<inputtype= "text"name= "Age"/> A <BR/> - <inputtype= "Submit"value= "Post submission data"/> - </form> the </Body> - </HTML>

The above code submits the data in the form to the php_post1.php file.

The php_post1.php code is as follows:

<!doctype html>PHP Echo "My name." $_post [' fname ']. ". This year. " $_post [' Age ']. Years old! ";? ></body>

The above code prints the data from the $_post[' fname ' and $_post[' age ' to the Web page using the function echo.

User Output Form processing PHP

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.