form表单提交:
1
2
3
4
5
6
7
8
9
|
<body> <form action= "php_request2.php"
method= "post" >
姓名: <input type= "text"
name= "userName"
id= "user1" /> <br/>
密码: <input type= "password"
name= "pwd" /> <br/>
<input type= "submit"
value= "提交" />
<input type= "button"
value= "提交2"
/>
</form> </body> |
在上个页面上输入姓名、密码后,点击提交,会把页面上的内容提交到下面这个页面
1
2
3
4
5
6
7
|
<?php $user
= $_POST [ "userName" ];
$pwd
= $_POST [ "pwd" ];
echo
$user . " " .<span style= "background-color: rgb(136, 136, 136);" >md5</span>( $pwd );
?> <a href= "php_request3.php?userName=<?php echo $user ?>" >跳转</a>
|
密码被隐藏,用md5让密码安全性更高