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的方式跳转

posted @ 2018-04-16 13:44  Burning_Ice  阅读(987)  评论(0编辑  收藏  举报