$sql="INSERT INTO `user`(`id`, `username`, `password`, `email`, `idgroup`, `lastdate`) VALUES ('','$_POST[username]','$_POST[password]','$_POST[email]','$_POST[idgroup]',now())"; $sql1="select * from user where username='$_POST[username]'"; $sql2="select * from user where email='$_POST[email]'"; if(mysql_query($sql1)){ echo "";}elseif (mysql_query($sql2)){ echo "";}else{ if(mysql_query($sql)){ print( ""); }}这是服务器端的判断 也可以用ajax判断
取消
评论