php使用表单post方法进行页面

Posted BurningChen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了php使用表单post方法进行页面相关的知识,希望对你有一定的参考价值。

<?php
$action = \'http://www.cnblogs.com/burningc/\';
$method = \'post\';
$key = \'\';
$val = \'\';

$shtml = "<form id=\'submit\' name=\'submit\' action=\'".$action."\' method=\'".$method."\'>";
$sHtml.= "<input type=\'hidden\' name=\'".$key."\' value=\'".$val."\'/>";
$sHtml = $sHtml."</form>";
$sHtml = $sHtml."<script>document.forms[\'submit\'].submit();</script>";

echo $sHtml;

  

header(\'location:./test.php?i=1\');  跳转方式是以get的方式跳转

以上是关于php使用表单post方法进行页面的主要内容,如果未能解决你的问题,请参考以下文章