My code is not working i want to check Email exist in db or show message email exit or not when click tab button:
HTML:
<input class="form-control" type="text" name="email" id="email" onkeyup="checkemail();" required>```
PHP:
<?php
$checkemail = mysqli_query($conn, "Select email FROM users WHERE email = '$email'")
while(mysqli_fetch_assoc($checkemail) > 0)
{
echo "Email Already Exist :)";
}
else
{
echo "OK :)";
}
exit();
}
?>