RE: [PHP] validation
| From: | Maxim Maletsky | Date: | Mon, 11 Sep 2000 02:19:31 +0000 |
| Subject: | RE: [PHP] validation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-16107@lists.php.net to get a copy of this message | ||
if($email)<0){...
Looks suspicious, are you sure it is supposed to be less then zero? at least
less/equal or equal....
less then zero doesn't make any sence, often...
like if($email<=0) or if($email==0) or perhaps ($email<1)...
check it better ...
-----Original Message-----
From: GaryB [mailto:deadfred@2die4.com]
Sent: Monday, September 11, 2000 9:02 AM
To: php-general@lists.php.net
Subject: [PHP] validation
Hi,
Newbie alert! I have a form where the action is contact_us.php. What
contact_us.php is supposed to do is, validate the name and email
address then send me some mail and, put the info into the db. Everything
is working except the email validation, the class is working my code
isn't. I am using the email validation class from PHP Class Repository.
Here is a piece the validation code. I need to learn this, so please
explain your answers.
// validation check
if (strlen($name)<5 ) {
header("Location: http://mywebsite.com/test/name_error.php3");
}
require("email_validation.php");
if($email)<0){
header("Location: http://mywebsite.com/test/email_error.php3");
exit();
}
//Send Email From Contact Form
TIA
Gary
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net