How can i check if username and email exists i have this code but its only checking the email not the username...
$sql = "SELECT `Email`, `UserUsername` FROM `users` WHERE `UserUsername`='".$user."' AND `Email`='".$email."'";
$result = $conn->query($sql);
if($result->num_rows >= 1) {
echo "Email or Username already exist, try something else.";
} else {
// ....
}