Home  >  Article  >  Backend Development  >  表单参数不能获取写入数据库,该如何解决

表单参数不能获取写入数据库,该如何解决

WBOY
WBOYOriginal
2016-06-13 10:20:22948browse

表单参数不能获取写入数据库
写入sql server 2000 数据库 字段为varchar  

edit.php代码如下:



 
 

 
 
 
 
 
 
 
 
 
 
 

editupload.php代码如下:
$niandu=$_POST['niandu'];
$kwm=$_GET['kwm'];
$wjm=$_POST['wjm'];
$htmladd=$_POST['htmlfile'];
$docadd=$_POST['filename'];
$fcren=$_GET['name'];
$fctime=$_POST['time'];
$kwm_id=$_GET['kwm_id'];

//定义数据库连接
include "connect.php";
$str="insert into kanwu (niandu,kwm,wjm,htmladd,docadd,fcren,fctime,bm,qx,kwm_id) values ('$niandu','$kwm','$wjm','$htmladd','$docadd','$fcren','$fctime','$bm','$qx','$kwm_id')";
mssql_query($str,$link);
?>

现在kwm和fcren字段写入数据库的值为“?”,其他表单字段都可以正常写入数据库字段,请大家帮忙看看

------解决方案--------------------
kwm和fcren字段的类型?
你的程序文件的编码?
------解决方案--------------------
form是POST提交,你是从哪得到这些GET值的??
返回上一级     
  " type="hidden">

  " type="hidden">
刊物名称: echo $_GET[kwm]?> 发布时间:
 
选择年度:
  include "niandu.php"?>
    发出 echo $_GET[kwm]?>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn