[PHP]
function google($yourQ)
{
if ($yourAnswer == NULL)
{
echo "Help! no answer on google";
}
else
{
$you = $bangHeader->Table * 100;
return $you;
}
}
[/PHP]
google("Email Verification Exists");
HAHA!
I'm so saving that; use it on a newbie caught in the headlights :D
To the OP:
The best way to validate an email is using a regex (regular expression)
There are soooo many tutorials on the world wide internets, so a simple google search (no headbanging required) will suffice!
Here's a validation i use:
[php]
function validateEmail() {
global $__errorEmail;
$email = $_POST['email'];
$__emailExp = '/^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$/';
I'm so saving that; use it on a newbie caught in the headlights :D
To the OP:
The best way to validate an email is using a regex (regular expression)
There are soooo many tutorials on the world wide internets, so a simple google search (no headbanging required) will suffice!
Here's a validation i use:
[php]
function validateEmail() {
global $__errorEmail;
$email = $_POST['email'];
$__emailExp = '/^[a-z0-9_\+-]+(\.[a-z0-9_\+-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*\.([a-z]{2,4})$/';
Tthis is pretty much what I do for email verification. the draw back with this is that is simply checks that the user entered value s in the correct format to be an email address.
If you then send an email to that address using PHP you can checkt the return of mail() and if this is true it was able to send themail so you can call it good. If it is false then the chances are the email is bad and so you can take steps to remove it from the list.
I admit thisis not foolproof but it does give you a further option for attempting keep your email list clean. You can of course allow for tolerance to say if the email fails 5 times then remove it. This is a bitmore advaced and you'd need to check the database for each email address as you send the email out.
I hope this makes sense and I wish you luck with the project.
Comment