001.html
<HTML><Head><title>User log</title><Metahttp-equiv= "Content-type"content= "Text/html;charset:utf-8"></Head><Body><formMethod= "POST"Action= "001.php">User name:<inputtype= "text"name= "user_name"Required= "Required"placeholder= "Please fill in User name">//HTML5 Form PropertiesPassword:<inputtype= "Password"name= "pwd"Required= "Required"placeholder="********">//HTML5 Form Properties<inputtype= "Submit"name= "Submit"value= "Log"></form></Body></HTML>
001.php
<HTML><title>Welcome!!!</title><Body><?php$name=$_post[' user_name '; $pwd =$_post[' pwd '];?><PAlign= ' Center '>Welcome New customer!</P><PAlign= ' Center '>Your username is<?php echo $name;?><BR>Your Password is<?php echo $pwd;?><BR></P><!--$_server more commonly used fields-<PAlign= ' Center '>The root file is located at:<?php echo dirname ($_server["php_self"])?><BR>Server name:<?php echo $_server["SERVER_NAME"]?><BR>the software used is:<?php echo $_server["Server_software"]?><BR>HTTP protocol:<?php echo $_server["Server_protocol"]?><BR>Data submission Method:<?php echo $_server["Request_method"]. " Time to accept the request: ". Date (' y-m-d h:i:s ', $_server[" Request_time "])?><BR>The file directory is:<?php echo $_server["Document_root"]?><BR>Agent:<?php echo $_server["Http_user_agent"]?><BR>IP Address:<?php echo $_server["REMOTE_ADDR"]?></P><!--server variable $_server array all --<Tablewidth= ' 100% 'Border= ' 1 '><?php foreach ($_server as $key = $value) {echo <<<eot <tr> <td width= ' 25% ' > $key </ td> <td> $value </td> </tr>EOT; } ?></Table></Body></HTML>
Server variable Super Global array $_server (additional super-simple form and HTML5 form properties)