Checking Get variable exists

Checking Get variable exists

am 17.09.2007 18:08:05 von ampeloso

Hello,
How do I check to see if a GET varaible exists?
This is giving me an error message.

if (isset !($_GET['id']))
{die('You must Have a Key to get in');
}

Thanks

Re: Checking Get variable exists

am 17.09.2007 18:14:50 von zeldorblat

On Sep 17, 12:08 pm, Mike wrote:
> Hello,
> How do I check to see if a GET varaible exists?
> This is giving me an error message.
>
> if (isset !($_GET['id']))
> {die('You must Have a Key to get in');
>
> }
>
> Thanks

How about:

if(!isset($_GET['id']))

Re: Checking Get variable exists

am 17.09.2007 18:17:08 von Steve

"Mike" wrote in message
news:1190045285.372415.277150@57g2000hsv.googlegroups.com...
> Hello,
> How do I check to see if a GET varaible exists?
> This is giving me an error message.
>
> if (isset !($_GET['id']))
> {die('You must Have a Key to get in');
> }

well, is the error "you must have a key to get in"?

just tac this onto the end your the url:

?id=qwerty

you shouldn't get that error at that point. do you understand the difference
between $_GET, $_POST, $_REQUEST?

Re: Checking Get variable exists

am 17.09.2007 19:03:03 von Steve

"ZeldorBlat" wrote in message
news:1190045690.793118.109970@n39g2000hsh.googlegroups.com.. .

> if(!isset($_GET['id']))


lol...i didn't even see that. chuckle.