print_r($_POST);POST提交上来的数据全部都在$_POST数组上。

解决方案 »

  1.   

    传过来的数据都在$_POST,可以把他们取出来插库;如果查库成功在执行以为的语句;下面的语句和你前面的语句一样,只是把:
    <input name="phonecode2" type="text" id="phonecode2" maxlength="11" /> </td> 
    换成:
    <input name="phonecode2" type="text" id="phonecode2" maxlength="11" />$_POST['aa']</td>
    这样就可以了 
      

  2.   

    还是不是很懂啊!$_POST['aa']是哪里来的?
      

  3.   

    这里的$row_comebase = mysql_fetch_assoc($comebase);改为你的POST表单数据,即是改为:
    $row_comebase = $_POST;
    这样应该可以的
      

  4.   

    POST变量是一个储存表单数据的数组
      

  5.   

    谢谢你的指点,我试试再给您回!
    我想问一下,$_POST数组在我点提交时,换到另外一个网页不是已经消失了吗?或说它什么时候消失?
    还有页面间的数据传递不是应该用_GET吗?
    请指点?
      

  6.   

    在我的第二个页面上加上<?php echo $_POST['patient_id']; ?>后还是没有反应啊!
      

  7.   

    晕晕的。挺简单的。看下插入代码就好了。,,,,,
    www.phpxd.com
      

  8.   

    你试一下print_r($_POST),看看有没有数据
    $_POST提交方的PHP页面是没有这个数据的,只有被提交方才有POST数据
    你说的GET是URL参数方式传递
    小数据则可以用GET,大的话就要用POST的
    比如文件,还有一些机密数据就一定要用POST了
      

  9.   

    <?php require_once('Connections/query.php'); ?>
    <?php
    function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
    {
      $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue;  switch ($theType) {
        case "text":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;    
        case "long":
        case "int":
          $theValue = ($theValue != "") ? intval($theValue) : "NULL";
          break;
        case "double":
          $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL";
          break;
        case "date":
          $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
          break;
        case "defined":
          $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
          break;
      }
      return $theValue;
    }$editFormAction = $_SERVER['PHP_SELF'];
    if (isset($_SERVER['QUERY_STRING'])) {
      $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
    }if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "importform1")) {
      $insertSQL = sprintf("INSERT INTO patient_base (patient_id, name, sex, age, `work`, birthplace, nation, allergichistory, address, phonecode1, phonecode2) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['patient_id'], "text"),
                           GetSQLValueString($_POST['name'], "text"),
                           GetSQLValueString($_POST['sex'], "text"),
                           GetSQLValueString($_POST['age'], "int"),
                           GetSQLValueString($_POST['work'], "text"),
                           GetSQLValueString($_POST['birthplace'], "text"),
                           GetSQLValueString($_POST['nation'], "text"),
                           GetSQLValueString($_POST['allergichistory'], "text"),
                           GetSQLValueString($_POST['address'], "text"),
                           GetSQLValueString($_POST['phonecode1'], "text"),
                           GetSQLValueString($_POST['phonecode2'], "text"));  mysql_select_db($database_query, $query);
      $Result1 = mysql_query($insertSQL, $query) or die(mysql_error());  $insertGoTo = "intoexamination.php";
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $insertGoTo));
    }if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "importform1")) {
      $insertSQL = sprintf("INSERT INTO patient_base (patient_id, name, sex, age, `work`, birthplace, nation, allergichistory, address, phonecode1, phonecode2) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
                           GetSQLValueString($_POST['patient_id'], "text"),
                           GetSQLValueString($_POST['name'], "text"),
                           GetSQLValueString($_POST['sex'], "text"),
                           GetSQLValueString($_POST['age'], "int"),
                           GetSQLValueString($_POST['work'], "text"),
                           GetSQLValueString($_POST['birthplace'], "text"),
                           GetSQLValueString($_POST['nation'], "text"),
                           GetSQLValueString($_POST['allergichistory'], "text"),
                           GetSQLValueString($_POST['address'], "text"),
                           GetSQLValueString($_POST['phonecode1'], "text"),
                           GetSQLValueString($_POST['phonecode2'], "text"));  mysql_select_db($database_query, $query);
      $Result1 = mysql_query($insertSQL, $query) or die(mysql_error());
      if (isset($_SERVER['QUERY_STRING'])) {
        $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
        $insertGoTo .= $_SERVER['QUERY_STRING'];
      }
      header(sprintf("Location: %s", $insertGoTo));
    }mysql_select_db($database_query, $query);
    $query_getquery = "SELECT * FROM patient_base";
    $getquery = mysql_query($query_getquery, $query) or die(mysql_error());
    $row_getquery = mysql_fetch_assoc($getquery);
    $totalRows_getquery = mysql_num_rows($getquery);
    ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- DW6 -->
    <head>
    <!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>石首市人民医院口腔科信息系统</title>
    <link rel="stylesheet" href="emx_nav_left.css" type="text/css" />
    <script type="text/javascript">
    <!--
    var time = 3000;
    var numofitems = 7;//menu constructor
    function menu(allitems,thisitem,startstate){ 
      callname= "gl"+thisitem;
      divname="subglobal"+thisitem;  
      this.numberofmenuitems = allitems;
      this.caller = document.getElementById(callname);
      this.thediv = document.getElementById(divname);
      this.thediv.style.visibility = startstate;
    }//menu methods
    function ehandler(event,theobj){
      for (var i=1; i<= theobj.numberofmenuitems; i++){
        var shutdiv =eval( "menuitem"+i+".thediv");
        shutdiv.style.visibility="hidden";
      }
      theobj.thediv.style.visibility="visible";
    }

    function closesubnav(event){
      if ((event.clientY <48)||(event.clientY > 107)){
        for (var i=1; i<= numofitems; i++){
          var shutdiv =eval('menuitem'+i+'.thediv');
          shutdiv.style.visibility='hidden';
        }
      }
    }
    // -->
    </script>
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    width:1101px;
    height:1057px;
    z-index:1;
    left: 45px;
    top: 107px;
    }
    #Layer2 {
    position:absolute;
    width:230px;
    height:439px;
    z-index:2;
    left: 4px;
    top: 36px;
    }
    #Layer3 {
    position:absolute;
    width:846px;
    height:444px;
    z-index:2;
    top: 37px;
    left: 249px;
    }
    .STYLE1 {
    font-family: "宋体";
    font-size: x-large;
    }
    -->
    </style>
    </head>
    <body onmousemove="closesubnav(event);">
    <div class="skipLinks">skip to: <a href="#content">page content</a> | <a href="#pageNav">links on this page</a> | <a href="#globalNav">site navigation</a> | <a href="#siteInfo">footer (site information)</a> </div>
      

  10.   

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <!-- DW6 -->
    <head>
    <!-- Copyright 2005 Macromedia, Inc. All rights reserved. -->
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>石首市人民医院口腔科信息系统</title>
    <link rel="stylesheet" href="emx_nav_left.css" type="text/css" />
    <script type="text/javascript">
    <!--
    var time = 3000;
    var numofitems = 7;//menu constructor
    function menu(allitems,thisitem,startstate){ 
      callname= "gl"+thisitem;
      divname="subglobal"+thisitem;  
      this.numberofmenuitems = allitems;
      this.caller = document.getElementById(callname);
      this.thediv = document.getElementById(divname);
      this.thediv.style.visibility = startstate;
    }//menu methods
    function ehandler(event,theobj){
      for (var i=1; i<= theobj.numberofmenuitems; i++){
        var shutdiv =eval( "menuitem"+i+".thediv");
        shutdiv.style.visibility="hidden";
      }
      theobj.thediv.style.visibility="visible";
    }

    function closesubnav(event){
      if ((event.clientY <48)||(event.clientY > 107)){
        for (var i=1; i<= numofitems; i++){
          var shutdiv =eval('menuitem'+i+'.thediv');
          shutdiv.style.visibility='hidden';
        }
      }
    }
    // -->
    </script>
    <style type="text/css">
    <!--
    #Layer1 {
    position:absolute;
    width:1101px;
    height:1057px;
    z-index:1;
    left: 45px;
    top: 107px;
    }
    #Layer2 {
    position:absolute;
    width:230px;
    height:439px;
    z-index:2;
    left: 4px;
    top: 36px;
    }
    #Layer3 {
    position:absolute;
    width:846px;
    height:444px;
    z-index:2;
    top: 37px;
    left: 249px;
    }
    .STYLE1 {
    font-family: "宋体";
    font-size: x-large;
    }