GET

<!--客户端发送-->
<form id="form1" action="doGet.php" method="get">
<input type="text" name="user1"><br/>
<input type="password" name="password1"><br/>
<input type="submit" value="GET方式提交"/>
</form>
//服务端处理
//doGet.php
<?php
echo $_GET['user1'];
echo "<br/>";
echo $_GET['password1'];
?>

POST

<!--客户端发送-->
<form id="form2" action="doPost.php" method="post">
<input type="text" name="user2"><br/>
<input type="password" name="password2"><br/>
<input type="submit" value="POST方式提交"/>
</form>
//服务端处理
<?php
echo $_POST['user2'];
echo "<br/>";
echo $_POST['password2'];
?>
05-26 11:50