Re: help with _get error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/03/2011 17:46, Jack wrote:
Hello All,



I'm having a problem with this line of code which worked fine for years:

$l_url2 = ".".$_GET[SERVER_NAME];



Here is the error:

[Wed Mar 23 13:33:49 2011] [error] [client 16.139.201.61] PHP Notice:  Use
of undefined constant SERVER_NAME - assumed 'SERVER_NAME' in
/home//modules/jack.php on line 322



Thanks!

J





You need to put the name of the GET data you want to read in brackets. Like so.

$_GET['SERVER_NAME'];

or

$l_url2 = ".".$_GET['SERVER_NAME'];


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux