Hey All,
My local server is causing me hassle again!
I turned global variables on in php.ini
register_globals = On
but the following code doesn't work
URL:
http://localhost/sites/test/var_test.php?test_var=TEST
test.php:
<? echo "Test Variable = ".$test_var; ?>
this just prints out
Test Variable =
instead of
Test Variable = TEST
if I change it to
<?
$test_var = $_GET['test_var'];
echo "Test Variable = ".$test_var;
?>
it works fine.
I know I should write my code to work with globals off but I have some old sites I want to edit and I cant face rewriting them!!
If anyone can help me I promise I will code properly from now on!!
Many Thanks
Al