Forum Moderators: coopster

Message Too Old, No Replies

Variables will not function correctly

Server changed settings and i don't know which one...

         

Muffo

11:15 am on Feb 14, 2004 (gmt 0)

10+ Year Member



I ahve a problem with a website that, untill a couple of days ago, was working flawlessly...

The page will no longer recognise variables specified in a link (i.e.?skin=black)

It then appears to use the line...

<?php if ($skin == "") $skin = "blue";?>

what server setting could have made this no longer function?

justageek

11:33 am on Feb 14, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I think it is the globals so check that.

You should be able to see '?skin=black' by using something like $HTTP_GET_VARS['skin'] also.

JAG

Muffo

6:00 am on Feb 15, 2004 (gmt 0)

10+ Year Member



what do you mean by globals?

"register_globals", is that what you mean, because it is turned off :¦

mep00

8:33 am on Feb 15, 2004 (gmt 0)

10+ Year Member



"register_globals", is that what you mean, because it is turned off
That sounds like the cause of your problem. You need to use $_GET [php.net]['skin']. $_GET is a superglobal and exsists even with the default register_globals turned off.

Note: $HTTP_GET_VARS has been deprecated.