I want to integrate FILTER_VALIDATE_EMAIL filter when users want to sign up.
I have this input:
<input type="text" name="email" maxlength="255" />
Some parts of code:
- $email = strip_tags(mysql_real_escape_string($_POST['email']));
- $email2 = mysql_query("SELECT * FROM users WHERE
email
= '{$email}'");
and this:
if(mysql_num_rows($email2) == 1)
{
echo "This email address is already in used.";
}
If you need more code let me know. Thanks!
It's first time when I use MySQL, be good!
Or other way to validate email, ofc.