PHP的两种表单数据提交方式
//通过隐藏表单提交 if ($_POST['action'] == 'register'){echo '你提交了数据';
exit();
}
?>
<!DOCTYPE html>
<head>
</head>
<body>
<div> <form method="post" name="register" action="register.php">
<input type="hidden" name="action" value="register" />
<ul>
<h2>请认真填写一下内容</h2>
<li>用 户 名:<input type='text' name='username'>
<li>密  码:<input type='password' name='password'> <li><input type='submit' value='提交'/></li>
</ul>
</form>
</div>
</body>
页:
[1]