復制代碼 代碼如下:
 
<html> 
<head> 
<meta http-equiv="Content-Type" content="text/html;charset=gb2312"> 
<title>注冊頁面</title> 
</head> 
<body> 
<form action="request.php" method="post"> 
<table cellpadding="5" bgcolor="#eeeeee"> 
<tr> 
<td>用戶名:</td> 
<td><input type="text"/></td> 
</tr> 
<tr> 
<td>姓名:</td> 
<td><input type="text"/></td> 
</tr> 
<tr> 
<td>密碼:</td> 
<td><input type="text"/></td> 
</tr> 
<tr> 
<td>郵箱:</td> 
<td><input type="text"/></td> 
</tr> 
<tr> 
<td colspan="2"> 
<input type="submit" value="提交"/> 
<input type="reset" value="重置"/> 
</td> 
</tr> 
</table> 
</form> 
</body> 
</html> 
復制代碼 代碼如下:
 
<?php 
$username = $_POST['username']; 
$name = $_POST['name']; 
$pwd = $_POST['pwd']; 
$email = $_POST['email']; 
//print_r($username); 
if(!empty($username)) 
{ 
echo "您填寫的信息為:<br>/n"; 
echo "用戶名: $username <br>/n"; 
echo "姓名: $name <br>/n"; 
echo "密碼: $pwd <br>/n"; 
echo "郵箱: $email <br>/n"; 
} 
print_r($_POST) 
//echo "aaaa"; 
?> 
</PRE> 
</DIV> 
新聞熱點
疑難解答