警告:mysqli_query()至少需要2个参数,第7行的C:\ xampp \ htdocs \ projek \ admin \ prosesadduser.php中给出1个参数
警告:mysqli_num_rows()期望参数1为mysqli_result,在第7行的C:\ xampp \ htdocs \ projek \ admin \ prosesadduser.php中给出空值
警告:mysqli_query()至少需要2个参数,第15行的C:\ xampp \ htdocs \ projek \ admin \ prosesadduser.php中给出1个参数
<?php
include 'session.php';
$username = $_POST['username'];
$password = $_POST['password'];
$fullname = $_POST['fullname'];
$result = mysqli_num_rows(mysqli_query("SELECT * FROM user WHERE USER_USERNAME='$username'"));
if($result == 1)
{
echo '<h1>ERROR!</h1>The username you have chosen already exists!';
}
else
{
mysqli_query("INSERT INTO user (USER_USERNAME, USER_PASSWORD, USER_FULLNAME)
VALUES ('$username','$password','$fullname')");
echo
?>
有人可以帮我吗?