首页上一页 1 下一页尾页 3 条记录 1/1页
php项目开发案例全程实录 第十二章电子商务页面注册页面“添加失败”怎么回事
发表在PHP图书答疑
2012-04-14
是否精华
是
否
版块置顶:
是
否
$sql = "insert into tb_user(name,password,question,answer,realname,card,tel,phone,Email,QQ,code,address,addtime,isfreeze,shopping)" ;
$sql .= " values ('$name', '$password', '$question', '$answer', '$realname', '$card', '$tel', '$phone', '$Email', '$QQ', '$code', '$address','$addtime','','')";
[font color=#FF0000]$rst = $conn->execute($sql);
if($rst == false){
echo '<script>alert(\'添加失败\');history.back;</script>';
[/font] }else{
$_SESSION['member'] = $name;
$_SESSION['id'] = $conn->Insert_ID();
echo "<script>top.opener.location.reload();alert('注册成功');window.close();</script>";
}
?>
$sql .= " values ('$name', '$password', '$question', '$answer', '$realname', '$card', '$tel', '$phone', '$Email', '$QQ', '$code', '$address','$addtime','','')";
[font color=#FF0000]$rst = $conn->execute($sql);
if($rst == false){
echo '<script>alert(\'添加失败\');history.back;</script>';
[/font] }else{
$_SESSION['member'] = $name;
$_SESSION['id'] = $conn->Insert_ID();
echo "<script>top.opener.location.reload();alert('注册成功');window.close();</script>";
}
?>