re: an if statement
| From: | David Robley | Date: | Fri, 26 Mar 2004 09:06:14 +0000 |
| Subject: | re: an if statement | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181544@lists.php.net to get a copy of this message | ||
aborka1@wmis.net (Andy B) wrote in
news:000c01c410a1$077c9240$34c66dd8@andy:
>> although that'll generally "work", why not use
>>
>> if(empty($name) || empty($comments))
>> { dosomething(); }
>>
>> --
>> ---John Holmes...
>
>
> because for some odd reason on any of the versions of php i am writing
> for (4.0.6-4.1.3) it always fails
>
Are $name and $comment being passed from a form? In which case you may need
to use $_GET or $_POST