RE: [PHP] if statment
| From: | Jennifer Goodie | Date: | Mon, 31 Mar 2003 20:20:47 +0000 |
| Subject: | RE: [PHP] if statment | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141732@lists.php.net to get a copy of this message | ||
I'm pretty sure that if it was in a form but left blank isset() won't work
because it is set in the globals, it is just empty. I've never used
empty(), so I cannot comment on its behavior.
-----Original Message-----
From: Pete James [mailto:Pete_James@advanis.ca]
Sent: Monday, March 31, 2003 12:17 PM
To: php-general@lists.php.net
Subject: Re: [PHP] if statment
Also, take a look at isset() and empty()
http://php.net/empty
http://php.net/isset
Jennifer Goodie wrote:
> so change it to ""
>
> -----Original Message-----
> From: Tim Haskins [mailto:tim@copiousdg.com]
> Sent: Monday, March 31, 2003 12:12 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] if statment
>
>
> My bad, I actually meant that the "nothing" was like, if the pr_ID in the
> url is empty then show the following text.
>
> --
> Tim Haskins
>
> "Jennifer Goodie" <goodie@apollointeractive.com> wrote in message
>
> news:NEBBIJJIKBGCCCNKMPBCCEIGGNAA.goodie@apollointeractive.com...
>
>>if( $HTTP_GET_VARS["pr_ID"] == "nothing"){
>>echo "there are no products";
>>}
>>http://www.php.net/manual/en/control-structures.php
>>
>>http://www.php.net/manual/en/
>>
>>-----Original Message-----
>>From: Tim Haskins [mailto:tim@copiousdg.com]
>>Sent: Monday, March 31, 2003 11:56 AM
>>To: php-general@lists.php.net
>>Subject: [PHP] if statment
>>
>>
>>I'm used to asp and not php, but what would the code be for and if
>
> statement
>
>>that was like:
>>
>> if $HTTP_GET_VARS["pr_ID"] = "nothing" then
>>"there are no products"
>>end if
>>
>>Also does anyone know a great resource that lists different examples of
>
> php
>
>>variables, if statements, and so on?
>>
>>Thanks so much!
>>--
>>Tim Haskins
>>
>>
>>
>