php中request、post和get的使用

2025-05-20 13:53:21

1、打开php的编辑器,写上这个程序的注释内容。

php中request、post和get的使用

2、新建一个函数,命名为qingqiu

php中request、post和get的使用

3、然后新建一个表单。<form action="jieshou.php" method="post"> tireqty:<input type="number" min=1 max=10 name="tireqty" /><br/> oilqty:<input type="number" min=1 max=10 name="oilqty" /><br/> sparkqty:<input type="number" min=1 max=10 name="sparkqty" /><br/> address:<input type="text" name="address" /><br/> <input type="submit" name="submit" /><br/> </form>

php中request、post和get的使用

4、request的使用。$qingqiu1=$_REQUEST['tireqty'];

php中request、post和get的使用

5、post的使用。$qingqiu2=$_POST['oilqty'];

php中request、post和get的使用

6、GET的使用。$qingqiu3=$_GET['sparkqty'];

php中request、post和get的使用

7、最后将这些结果输出来。echo $孥恶膈茯qingqiu1."&nbsp;&nbsp;".$qingqiu2."&nbsp;&nbsp;".$qingqiu3;

php中request、post和get的使用
声明:本网站引用、摘录或转载内容仅供网站访问者交流或参考,不代表本站立场,如存在版权或非法内容,请联系站长删除,联系邮箱:site.kefu@qq.com。
猜你喜欢