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