Hi Diane > What specific code would I have to add to make my contact form only > accept an E-Mail Address where it is asked for? Right now it will > accept anything: > > http://dkjwebs.com/contact.php <http://dkjwebs.com/contact.php>
There are many ways to do it. I'd say: keep it simple. If somebody dows not want to enter it he will fake it. p.e. "[EMAIL PROTECTED]" I'd just preg_match() against this expression: /[EMAIL PROTECTED],4}$/ the rule says: it must start with a char from a to z followed by at least one char no matter what than a @ followed by at least one char no matter what followed by a dot and a top level domain from 2 to 4 chars length only containing only a to z. But this will fail on this valid notation: "my name" <[EMAIL PROTECTED]> You can also try to send him an email - if it bounces it is not valid. But that may take longer that the contact form is open. HTH, Patrick