Click to See Complete Forum and Search --> : [Resolved] Url variables


alfoxy
06-13-2005, 05:12 PM
Hey All,

I just reinstalled my Apache server, MySql and Php as my computer suffered a fatal crash. I had it all working fine last time but this time it wont accept url variables

e.g.

http://localhost/test.php?test_var=3

and test.php just echos $test_var
echo "test_var = ".$test_var."<br>";

I get:

test_var =

Any Ideas ?? Its so long since I installed it first time, Im sure there is a simple solution but I just cant remember!

Thanks

Al

planetsim
06-13-2005, 05:29 PM
try using $_GET['test_var']

alfoxy
06-13-2005, 05:44 PM
Yep that works

but is there a setting in the php.ini file or something that allows $test_var instead of $_GET['test_var'] like I used to have it or else my old stuff wont work?

Thanks

Al

leatherback
06-13-2005, 06:08 PM
There is, but you shouldn't. This is a security setting, helping you keep your scripts safe(r).

Anyway. Look at register_globals if you really feel strongly about it, and

learn to ask the right question (http://homepages.tesco.net/~J.deBoynePollard/FGA/questions-with-yes-or-no-answers.html)

alfoxy
06-13-2005, 07:00 PM
Many thanks leatherback, that was what I was looking for .... and Ill take your Yes/No ideas under consideration !

Al out