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

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

$sHtml = "<form  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的方式跳转