Re: validating form data...

From: Date: Mon, 22 Oct 2001 19:27:11 +0000
Subject: Re: validating form data...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-71819@lists.php.net to get a copy of this message
&& and "and" are same except that they stay at different levels in the precedence table. But if the programmer is skilled he will never write code which depends on the precedence table but put brackets here and there, everywhere they are needed. -- Andrey Hristov Web Developer Icygen Corporation BUILDING SOLUTIONS http://www.icygen.com On Monday 22 October 2001 08:19 am, you wrote: > hellorghh !!! > > I think that : > > if ((email_is_valid($Email)) && ($Name != "") && ($Message != "")){ > do stuff ... > } > > ...should be better . (&&, not "and") > > > "Toke Herkild" <cafe@hodclub.dk> a écrit dans le message news: > 20011022115945.45960.qmail@pb1.pair.com... > > > I've made a script which ought to validate if there is data in the fields > > or > > > not... but it doesn't seem to work... > > > > the validation is following: > > if ((email_is_valid($Email)) and ($Name != "") and ($Message != "")){ > > do stuff ... > > } > > > > But even if I submit an empty form it executes "do stuf..." > > I have tried to put an empty space into the $Name and $Message test but > > that > > > doesn't seem to do any difference either... > > > > > > > > -- > > 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 > > (°- Nayco. > //\ nayco@netcourrier.com > v_/_ http://nayco.free.fr

« previous php.general (#71819) next »