大家帮忙找下有关问题所在 小弟我实在看不出来
程序员文章站
2024-02-08 22:32:22
...
大家帮忙找下问题所在 我实在看不出来
$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 "";
}
else
{
echo "";
}
------解决思路----------------------
把 $res_insert = mysql_query($sql_insert);
改为 $res_insert = mysql_query($sql_insert) or die(mysql_error());
$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 "";
}
else
{
echo "";
}
------解决思路----------------------
把 $res_insert = mysql_query($sql_insert);
改为 $res_insert = mysql_query($sql_insert) or die(mysql_error());
相关文章
相关视频
上一篇: 帝国cms下 列表页中使用灵动标签后,分页函数怎么写
下一篇: php 获取远程文件的大小的方法