index.html页面的实现
<!DOCTYPE html>
<html>
<head>
<title>登录</title>
<meta charset="utf-8">
</head>
<body>
<form action="index.php" method="get" >
姓名:<input type="text" name="name"><br/>
密码:<input type="password" name="pass"><br/>
<input type="submit" >
</form>
</html>
index.php页面实现
具体用到了 PHP_GET方法
<?php
header('content-type: text/html; charset=utf-8');
echo '欢迎用户 :'.$_GET['name'];
echo '<br/>' ;
$s= $_GET['pass'];
echo '密码'. $s;
?>