<?
$ary=array(
 "p1"="ABC",
 "p2"="123",
 "g1"="HJK",
 "g2"="789"
);
printf("<form action='action.php?g1=%s&g2=%s'>",$ary["g1"],$ary["g2"]);
printf("<input type='text' value='%s' name='p1' />",$ary["p1"]);
printf("<input type='text' value='%s' name='p2' />",$ary["p2"]);
print("<input type='submit' />");
print("</form>");
?>

解决方案 »

  1.   

    e……没看懂……
    没有数据被post传了啊
      

  2.   

    <form method="post" action="index.php?get1=the_get1_value">
    <input type="text" name="post1">
    <input type="submit">
    </form>get1这个就是用GET来传递的
    post1这个就是用POST来传递的
      

  3.   

    做两个form啊`
    用JAVASCRIPT来同时提交两个form不就是了没`
      

  4.   

    if( !isset($_POST['e']) && !isset($_GET['e']) ) echo "非法请求";
    elseif( !isset($_POST['e']) ) $var = $_GET['e'];
    else $var = $_POST['e'];
      

  5.   

    <?
    $ary=array(
     "p1"="ABC",
     "p2"="123",
     "g1"="HJK",
     "g2"="789"
    );
    printf("<form action='action.php?g1=%s&g2=%s' method='post'>",$ary["g1"],$ary["g2"]);
    printf("<input type='text' value='%s' name='p1' />",$ary["p1"]);
    printf("<input type='text' value='%s' name='p2' />",$ary["p2"]);
    print("<input type='submit' />");
    print("</form>");
    ?>
    加一个 mothod='post'