首页上一页 1 下一页尾页 1 条记录 1/1页
发生错误,提交不了数据
发表在PHP图书答疑
2010-07-05
是否精华
是
否
版块置顶:
是
否
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '../images/1.gif' >','echo mysql_error();','2010-07-04 20:16:42')' at line 3
--------------------------------------------------------
上面的错误是下面返回的:
--------------------------------------------------------
<?php
include("global_manage.php");//连接数据源,不加../
if ($_POST[btn_tj]!=""){
$title=$_POST[txt_title];
$lxr=$_POST[txt_lxr];
$lxfs=$_POST[txt_lxfs];
$szss=$_POST[txt_szss];
$face=$_POST[atc_iconid];
$content=$_POST[file];
$now=date("Y-m-d H:i:s");
$sql="insert into mffb_file(file_title,file_lxr,file_lxfs,file_szss,file_face,file_content,file_date)
VALUES
('$title','$lxr','$lxfs','$szss','$face','$content','$now')";
$insert=$DB->query($sql);
if(!$insert){
echo mysql_error();
}else{
echo "<script>alert('恭喜您成功发布供求信息!!!');</script>";
}
$url = './file_fenye.php';
redirect_once($url);//页面跳转
}
?>
---------------------------------------------------------------------------------------------
错误是哪里?
--------------------------------------------------------
上面的错误是下面返回的:
--------------------------------------------------------
<?php
include("global_manage.php");//连接数据源,不加../
if ($_POST[btn_tj]!=""){
$title=$_POST[txt_title];
$lxr=$_POST[txt_lxr];
$lxfs=$_POST[txt_lxfs];
$szss=$_POST[txt_szss];
$face=$_POST[atc_iconid];
$content=$_POST[file];
$now=date("Y-m-d H:i:s");
$sql="insert into mffb_file(file_title,file_lxr,file_lxfs,file_szss,file_face,file_content,file_date)
VALUES
('$title','$lxr','$lxfs','$szss','$face','$content','$now')";
$insert=$DB->query($sql);
if(!$insert){
echo mysql_error();
}else{
echo "<script>alert('恭喜您成功发布供求信息!!!');</script>";
}
$url = './file_fenye.php';
redirect_once($url);//页面跳转
}
?>
---------------------------------------------------------------------------------------------
错误是哪里?