Sorted, thanks

Recommended Answers

All 2 Replies

FYI, when you solve your own problem posting the solution is better then deleting the question. That way others can learn from it and we don't have a hole in our forums. :)

I know tomf solved his problem, but here is an example anyway:

<?php
if (!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,4})$", $_POST)) {
echo 'Your email address is not valid.';
}
?>

I know it is monotonous, but it work great!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.