Re: Create mail/contact form
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Create mail/contact form

From: Terry <tknospa@wejuggle2.com>
Date: Wed Jul 20 2005 - 00:28:31 CEST

Stephanie wrote:
> Warning messages now within fieldset. (fixed)
>
> Still interested in validating email address (not validating if it exists,
> but if it's a valid syntax)

$email=eregi_replace("[^a-z0-9@\.\-_]*","",$email);
//replace any non valid characters with ""

if(!$email == "" && (!strstr($email,"@") || !strstr($email,".")))
{
echo $beginhtml,"e-mail ($email) is not a valid address, please correct
it or make sure it is blank.",$endhtml;
exit;

HTH

-- 
TK
http://www.wejuggle2.com/
Still Having a Ball
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?
.
----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Received on Mon Oct 17 21:11:40 2005