Re: [PHP] Need to check whether a param exists!

2003-02-03 Thread Brian Dunning
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

Re: [PHP] Need to check whether a param exists!

2003-02-03 Thread Chris Hayes
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

Re: [PHP] Need to check whether a param exists!

2003-02-03 Thread Chris Shiflett
--- 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']; >

Re: [PHP] Need to check whether a param exists!

2003-02-03 Thread 1LT John W. Holmes
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