Brian Dunning wrote:
How do I check for the presence of an optional $_GET param without
throwing a "Notice: Undefined index" when the param is not present?
Tried all three of these, they all produce the Notice when the param is
not passed:
if ($_GET['id'])
if ($_GET['id'] != "")
if (isset $_GET
MAIL PROTECTED]>,"[EMAIL PROTECTED]"
<[EMAIL PROTECTED]>
Subject: Re: [PHP] How to check for a $_GET without throwing a Notice?
Date: Wed, 26 May 2004 10:59:20 -0700
if (isset( $_GET['id']))
>>How do I check for the presence of an optional $_GET param without
>>t
> >>How do I check for the presence of an optional $_GET param without
> >>throwing a "Notice: Undefined index" when the param is not present?
> >>
> >>Tried all three of these, they all produce the Notice when
> the param
> >>is not passed:
> >>
> >>if ($_GET['id'])
> >>if ($_GET['id'] != "")
>
if (isset( $_GET['id']))
>>How do I check for the presence of an optional $_GET param without
>>throwing a "Notice: Undefined index" when the param is not present?
>>
>>Tried all three of these, they all produce the Notice when the param is
>>not passed:
>>
>>if ($_GET['id'])
>>if ($_GET['id'] !
From: "Brian Dunning" <[EMAIL PROTECTED]>
> How do I check for the presence of an optional $_GET param without
> throwing a "Notice: Undefined index" when the param is not present?
>
> Tried all three of these, they all produce the Notice when the param is
> not passed:
>
> if ($_GET['id'])
>
Hello Brian,
Wednesday, May 26, 2004, 4:01:30 PM, you wrote:
BD> How do I check for the presence of an optional $_GET param without
BD> throwing a "Notice: Undefined index" when the param is not present?
BD> Tried all three of these, they all produce the Notice when the param is
BD> not passed:
How do I check for the presence of an optional $_GET param without
throwing a "Notice: Undefined index" when the param is not present?
Tried all three of these, they all produce the Notice when the param is
not passed:
if ($_GET['id'])
if ($_GET['id'] != "")
if (isset $_GET['id'])
--
PHP Genera
7 matches
Mail list logo