大家帮忙找下有关问题所在 小弟我实在看不出来

WBOY
Release: 2016-06-13 12:24:12
Original
886 people have browsed it

大家帮忙找下问题所在 我实在看不出来
$sql_insert = "insert into tb_user (usernc,turename,pwd,email,sex,tel,qq,address,logintimes,regtime,lastlogintime,ip,yb,usertype,question,answer,truepwd,photo,score) values('$_POST[usernc]','$_POST[truename]','" . md5($psw) . "','$_POST[email]','$_POST[select]','$_POST[tel]','$_POST[qq]','$_POST[address]','0','" . date('Y-m-d H:i:s') . "','" . date('Y-m-d H:i:s') . "','" . $_SERVER['REMOTE_ADDR'] . "',' $_POST[yb]','0','$_POST[question]','$_POST[answer]','$_POST[truepwd]','$_POST[photo];','30')";
$res_insert = mysql_query($sql_insert);
//$num_insert = mysql_num_rows($res_insert);
if($res_insert)
{
echo "<script>alert('注册成功!'); history.go(-1);</script>";
}
else
{
echo "<script>alert('系统繁忙,请稍候!!!'); history.go(-1);</script>";
}
------解决思路----------------------
把 $res_insert = mysql_query($sql_insert);
改为 $res_insert = mysql_query($sql_insert) or die(mysql_error());

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template