Server variable Super Global array $_server (additional super-simple form and HTML5 form properties)

Source: Internet
Author: User
Tags php foreach

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)

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.