validating fields

From: Date: Fri, 02 Mar 2001 00:10:43 +0000
Subject: validating fields
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-42248@lists.php.net to get a copy of this message
I dont know how to do this, but Ive tried several things with no success. I need to validate several form fields and here is the script I'm working with... <?php if($HTTP_SERVER_VARS["REQUEST_METHOD"] == "POST") { (eregi("^[a-z0-9\._-]+@+[a-z0-9\._-]+\.+[a-z]{2,3}$", $Email))? header("Location: http://www.site.com/thanks.php"): header("Location: http://www.site.com/error.php"); } ;?> I need to check at least two more fields, possibly 3 but I keep getting errors when trying to loop through a bunch of if statements. The above works fine but I need to check eregi() against more strings from fields which then redirects as shown above. Anyone? _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com

« previous php.general (#42248) next »