网页上获取的数据无法通过post方法传递给action后指定的php程序中。

解决方案 »

  1.   

    <form name="form1" method="post" action="">不会不可以啊,你的代码是什么?.
        [align=center]====  ====
    [/align]
    .
    贴子分数<20:对自已的问题不予重视。
    贴子大量未结:对别人的回答不予尊重。
    .
      

  2.   

    <html>
     <head><title>邮政编码查询</title></head>
     <body bgcolor="white"text="black"link="blue"vlink="purple"alink="red">
      <h1 align="center">邮政编码查询系统</h1>
      <form name="form3"action="zip_query.php"method="post">
       <p align="center">请输入要查询的县市区域:<input type="text"name="zone"></p>
       <p align="center"><input type="submit"name="提交"><input type="reset"name="重设"></p>
      </form>  
     </body>
    </html>
    我这段代码就不能把获取的数据传递到下面这段代码里
    <html>
     <head><title>查询确认</title><head>
     <body>
      <?php
       $link=mysql_connect('localhost','root','830720')or die("could not connect:".mysql_error());
       mysql_query("use db1")or die("could not select database");
       $sqlstr="select * from zip where zone='".$_post['zone']."'";
       $result=mysql_query($sqlstr,$link)or die("Query failed:".mysql_error());
       echo "<center>以下是".$_post['zone']."的邮政编码数据<br><p>";
       echo "<table border=1>\n";
       echo "<tr>\n";
       /*显示表头*/
       while($field=mysql_fetch_field($result))
       {
        echo "<td>".$field->name."</td>\n";
       }
       echo "</tr>\n";
       /*显示表身*/
       while($row=mysql_fetch_row($result))
       {
        echo "<tr>\n";
        for($i=0;$i<count($row);$i++)
        {
         echo "<td>".$row[$i]."</td>";
        }
        echo "</tr>\n";
       }
       echo "</table>\n";
       echo "</center>";
       /*释放result*/
       mysql_free_result($result);
       /*关闭连接*/
       mysql_close($link);
      ?>
     </body>
    </html>
      

  3.   

    此回复为自动发出,仅用于显示而已,并无任何其他特殊作用
    楼主【ljctnt】截止到2008-06-27 11:20:25的历史汇总数据(不包括此帖):
    发帖数:2                  发帖分:40                 
    结贴数:0                  结贴分:0                  
    未结数:2                  未结分:40                 
    结贴率:0.00  %            结分率:0.00  %            
    如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
      

  4.   

    首先看下你的PHP版本,$_post在旧版本里不能用,只能用$HTTP_POST_VARS再看下你的程序里是不是把POST数组的东西给过滤了
      

  5.   

    action 是你需要跳转的页面 action="***.PHP"
    method 是你传递参数的方法 method="POST" 或者method="GET"如何结贴请参考这里:http://topic.csdn.net/u/20080501/09/ef7ba1b3-6466-49f6-9d92-36fe6d471dd1.html
      

  6.   

    把post过去的值打印出来看看是什么
      

  7.   

    这个$_POST应该大写吧,$_POST['zone']