时间:2021-07-01 10:21:17 帮助过:40人阅读
$username=$_REQUEST['username'];
$password=$_REQUEST['password'];
echo "
excute the insertUserInfo";
$con=mysqli_connect("localhost","root","","my_db");
$sql="SELECT * FROM user WHERE username='$username'";
ho "
this username aready exists"; } else { $sql="INSERT INTO user (username,password) VALUES ('$username','$password')"; if(!mysqli_query($con,$sql)) { echo "
Error".mysqli_error($con); } else { echo "
one record added"; } }
建议不要用:
代码如下:
mysql_num_rows($result)
lt;pre name="code" class="html">