RE: [PHP] One last try at this!
| From: | Jay Blanchard | Date: | Wed, 17 Jan 2007 19:32:28 +0000 |
| Subject: | RE: [PHP] One last try at this! | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-247255@lists.php.net to get a copy of this message | ||
[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"))
[snip]
Again, sorry to be a pain, but I just don't get it.
[/snip]
No problem Grasshopper