Heim > Artikel > Backend-Entwicklung > 大家帮忙找下有关问题所在 小弟我实在看不出来
大家帮忙找下问题所在 我实在看不出来
$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());