Hi,
Do you have any newsletters, contact forms or other pages where you require an email address ? If so, did you ever thought that someone might type “asd”, “452″ and other dummy words instead of a valid email address? Huh, for that I built an email validation script which checks for those things.
<?php function validMail ($email,$link) { if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z\-\.]+$",$email)) { print "Email address appears to be invalid<br />"; print "Go back <a href=\"$link\" title=\"inapoi\">click aici</a>"; exit(); } } ?>
You will need to pass two arguments :
1) $email field
2) $link to go back if email is invalid
Right like here
<?php $email = "abcdef"; validMail($email, "complete-form.php"); ?>
Great! Thank you very much!
I always wanted to write in my site something like that. Can I take part of your post to my blog?
Of course, I will add backlink?
Sincerely, Timur I. Alhimenkov
Thanks but
Nope sorry you cannot take nothing because I want to keep my content fresh and unique to avoid google penalties.
Hi. Your site displays incorrectly in Firefox, but content excellent! Thanks for your wise words.
Great to hear, on me site displays ok in all three tested browser : firefox, ie and opera!
Hi, cool site, good writing