<?php $link = mysql_connect("localhost","root","root"); if(!$link){ echo "数据库连接错误"; }else{ echo "数据库连接正常"; } mysql_select_db("registration"); mysql_query("set names utf8"); if(!mysql_query('SELECT id FROM emp where id=$_POST["id"]')){ mysql_query('INSERT INTO emp(id,password,email,name,sex,phone)VALUES($_POST["id"],$_POST["password"],$_POST["email"],$_POST["name"],$_POST["sex"]),$_POST["phone"]'); echo "注册成功"; }?>
添加回答
举报
0/150
提交
取消