Re: One last try at this!

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jay Blanchard wrote:
[snip]
if(empty($orgname)) { $formerror['orgname'] = "Optional"; }
elseif($result = ValidateString($orgname, "2")) { $formerror['orgname']
=
$result; }
	
if(empty($website)) { $formerror['website'] = "Optional"; }
if($result = ValidateString($website, "2")) { $formerror['website'] =
$result; }

if(empty($event)) { $formerror['event'] = "Optional"; }
if($result = ValidateString($event, "2")) { $formerror['event'] =
$result; }
[/snip]

The second condition of each if statement does not contain equality
checking, it sets the $result to ValidateString($event, "2"). That
should be
if($result == ValidateString($event, "2")) or
if($result === ValidateString($event, "2"))

What if the intension was to fail if the result of ValidateString() was false??

Then it should be writen as such.

if ( ( $result = ValidateString($event, "2") ) !== FALSE ) {
   $formerror['event'] = $result;
}

Jim Lucas
[snip]
Again, sorry to be a pain, but I just don't get it.
[/snip]

No problem Grasshopper


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux