I set my register globals on, yet my script is not working... why? It is almost exactly what my php training book gave for my first form! I know now that in PHP 4.2 they put register globals off, but I set it on in my php.ini file and it doesn't make this form work! I know the script is ok, cuz it works on a public php webserver.
test1.htm:
<FORM action="test2.php" method="get">
<INPUT name="myvariable" type="text">
<INPUT type="submit">
</FORM>
test2.php:
<?
echo $myvariable; //displays input from form test1.htm
?>
Why doesn't it work? I am running Apache 1.3.28 and PHP 4.3.3
I can get it to work if I put $GET['myvariable']; at the start of the script, above the echo... but can't I change my settings to make it work the way it used to work? Otherwise I'd have to change so many scripts that I've written which depend on massive numbers of variables that are sent through the ?var=value&var2=value way of doing it... if I have to write in $GET for every variable used in every script at any given point that'd be a nightmare.
Maybe my computer has a bug... I thought that setting register globals on was the fix.