Wow, an embarrassment of riches. Thanks to all of you who replied so
quickly.
- Brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
At 17:54 3-2-03, you wrote:
if (is_object($_REQUEST['page']))
for me
if (isset($_REQUEST['page']))
works.
I often add a check against an empty value after this check.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- Brian Dunning <[EMAIL PROTECTED]> wrote:
> All I'm trying to do is check for the presence of a
> query string, but everything I try gives me an
> Undefined Index error.
...
> http://www.mysite.com/index.php?page=hello
>
> if (is_object($_REQUEST['page']))
> $pagename = $_REQUEST['page'];
>
if(isset($_REQUEST['page']))
{ $pagename = $_REQUEST['page']; }
else
{ $pagename = 'home'; }
Should work... If not, let us know. Make sure your case match, too.
?page=hello and ?Page=hello are two different variables.
---John Holmes...
- Original Message -
From: "Brian Dunning" <[EMAIL P
4 matches
Mail list logo