Re: i need help with an undefined variable
| From: | Anyang | Date: | Wed, 02 Oct 2002 23:52:12 +0000 |
| Subject: | Re: i need help with an undefined variable | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-16138@lists.php.net to get a copy of this message | ||
thanks for the help. got it to work
"Brother - Martin Bagge" <brother@lunarstorm.se> wrote in message
news:D3E25D35F0237348A30DF8C845C4E95D024E7267@reddwarf.lunar.com...
> Anyang:
>
> > it's giving me this now:
> > Notice: Undefined index: game in C:\Xitami\webpages\index.php on line
> > 5 Notice: Undefined index: game in C:\Xitami\webpages\index.php on
> > line 8
> >
> > because i'm opening index.php without using ?game=
> > is there anything I can do to not get it to say that? it's not
> > reading $_GET["game"] as NULL but as undefined instead.
>
>
> if (!isset($_GET["game"])) {
> $game = "?"; //well what was an expected situation for requests without
game
> var?
> } else {
> $game = $_GET["game"];
> }
>
> then carry on with the code.
>