Hi everyone,

In my script I use $_GET['something']; This works fine on my server running apache (php version 4.6.3) but results in an error on a windows IIS-5 server (same php version)

I get this error:

Notice: Undefined index: page in .....

I heard it could have something to do with globals but I'm not sure. I tried changing globals on and off in php.ini, same problem.

Does anyone know what the problem might be? Any help would be very much appreciated. Thanks!

    use if (isset($GET['something']) && $GET['something']==x)

    Or @$_GET['something']

    Will get round it either way...

      Yes, it worked! Thanks!

      One question though; I am now supressing the error by placing the @. I would like to know why is this error generated...

        Depends on the error reporting in the PHP.ini file. I fyou have not set a variable, a notice is displayed - this started with a PHP version somewhere in the 4.0 or above (can't remember the exact version).

          Ok thanks... I've looked into my php.ini and see how this works now.

            Write a Reply...