print_r($_POST);POST提交上来的数据全部都在$_POST数组上。
解决方案 »
- 求助! 按时间段查询问题 请高手帮帮忙 小弟感激不尽
- Warning: rename(./新建文本文档11.txt,./新建文本文档111.txt) [function.rename]: Permission de
- PHP访问oracle的乱码问题
- 用foreach怎么遍历多维数组?
- 为什么我配置的PHP5不支持MySQL?
- 服务器缓存问题
- 有错误说headers already sent by ……,超难办啊
- 考勤分数统计(急用)
- 搭建论坛过程中php.ini的一点疑问
- CGI与ASP,PHP,JSP的不同之处在哪里啊?(很急)
- 为什么换了服务器,主页上的查询就没有用了?
- PHP中有没有类似于STL Map的功能
<input name="phonecode2" type="text" id="phonecode2" maxlength="11" /> </td>
换成:
<input name="phonecode2" type="text" id="phonecode2" maxlength="11" />$_POST['aa']</td>
这样就可以了
$row_comebase = $_POST;
这样应该可以的
我想问一下,$_POST数组在我点提交时,换到另外一个网页不是已经消失了吗?或说它什么时候消失?
还有页面间的数据传递不是应该用_GET吗?
请指点?
www.phpxd.com
$_POST提交方的PHP页面是没有这个数据的,只有被提交方才有POST数据
你说的GET是URL参数方式传递
小数据则可以用GET,大的话就要用POST的
比如文件,还有一些机密数据就一定要用POST了
<?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>
<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;
}