[Lvlug] PHP Test foir Variable
Caleb Shay
caleb at webninja.com
Thu Dec 22 09:54:29 EST 2005
if (isset($_REQUEST['bar'])) {
// whatever action
}
Cheers,
Caleb
On Thu, 2005-12-22 at 06:33 -0500, Paul Ryan wrote:
> Holiday Greetings, All.
>
> I'm doing a happy dance having finally gotten Apache 2.2, MySQL 4.1.14, PHP
> 4.4.1 and SSL running under Slack 10.2. When one stays on older versions too
> long, the move up to "current" can be painful!
>
> My question today concerns PHP. Is there a way to test for the existence of
> an item in the query string without actually equating the item. For
> instance:
> $foo = $_POST['bar'];
> or
> $foo = $_REQUEST['bar]';
> will both generate errors if bar was not defined in the calling FORM document.
> I would think there would be something like "if_exists" or "if_defined" or
> "exists" but I couldn't find it in my manual search. Oh, that's another
> thing, as the version numbers grow, so does the size of the manuals!
>
> :)
> Paul
>
>
> _______________________________________________
> Lvlug mailing list
> Lvlug at thelinuxlink.net
> https://www.thelinuxlink.net/mailman/listinfo/lvlug
More information about the Lvlug
mailing list