Check if $_GET["menu"] is null.

From: Nuno Paquete (nmp_at_ispgaya.pt)
Date: 07/30/04


Date: Fri, 30 Jul 2004 18:22:43 +0100

Hi group.
I'm using this code to see if is there any parameter for variable "menu":

   if($_GET["menu"] == "downloads")
        ....

But this code log errors if there is no parameter passed (this heappens at
the first time the page is loaded).

I tryed this code:

   if($_GET["menu"] != ""){
      if($_GET["menu"] == "downloads")
        ...

But this log the same error on the second line.
Any help hould be greattly appreciated.
Thanks in advance,

Nuno Paquete



Relevant Pages

  • Re: Check if $_GET["menu"] is null.
    ... "Nuno Paquete" wrote in message ... > But this code log errors if there is no parameter passed (this heappens at ... > the first time the page is loaded). ...
    (comp.lang.php)
  • Re: Check if $_GET["menu"] is null.
    ... >But this code log errors if there is no parameter passed (this heappens at ... >the first time the page is loaded). ... Black Helicopter Repair Svcs Division | Official Proof of Purchase ...
    (comp.lang.php)