This piece of code is causing error i am doing this project on my PC not on sololearn
here is the code $checkusername = "SELECT username FROM users_list WHERE username = '$userName'" $result = mysqli_query($conn,$checkusername) //check whether the user name already exists or not if (mysqli_num_rows($result) == 0) { $sql = "INSERT INTO users_list (fullname,username,birthdate,gender,password,session,dp,actype) VALUES('$fullName','$userName','$birth','$gender','$pass','$session','$dp','$actype')"; mysqli_query($conn,$sql); echo "<h1> Welcome '$fullName' </h1>"; mysqli_close($conn); } else { echo ("<script>alert('Username already taken'); window.location.href = '/'; </script>") } Error message = Parse error: syntax error, unexpected variable "$result" in C:\xampp\htdocs\multiplayerxo\profile.php on line 39