4.2.6 PHP实例(简单计算器)1

client.html

<a href="server.php?name=zhangsan&age=10">server</a>  <form action="server.php" method="post">     username: <input type="text" name="name"> <br>     age: <input type="text" name="age"> <br>      <input type="submit" name="sub" value="提交">  <form>   

server.php

<?php /* echo $_GET['name']."<br>"; echo $_GET['age']."<br>";  var_dump($_GET); echo '<br>'; var_dump($_POST);  */     echo $_POST['name'];     echo $_POST['age'];     echo $_POST['sub']; 

始发于简书:caoyuan

奇遇网

留下一条回复

关闭