I changed the code to the snippet below. It displays register globals off.

Damon

<html>
<head>
</head>
<body>
<form action="<?=$_SERVER['PHP_SELF']?>" method="post">
<input name="test">
<input type="submit">
</form>
</body>
</html>
<?php

print $test;

print "<br>";

$register_globals = (bool) ini_get('register_gobals');

print "register globals: " . ($register_globals ? "on" : "off");

phpinfo();
?>

"Jon Kriek" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> What does it say at script level?
>
> $register_globals = (bool) ini_get('register_gobals');
>
> "Damon Kohler" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
> > Well, it does turn off. At least phpinfo() says that it's off. However,
> PHP
> > is acting as though it's still turned on. The source code for the page
I'm
> > using to test this odd result is:
> >
> > <html>
> > <head>
> > </head>
> > <body>
> > <form action="<?=$_SERVER['PHP_SELF']?>" method="post">
> > <input name="test">
> > <input type="submit">
> > </form>
> > </body>
> > </html>
> > <?php
> >
> > print $test;
> >
> > phpinfo();
> > ?>
> >
> > I'm running PHP 4.3.3 on RH7. When the form is submited, the value is
> > printed despite the fact it's printing $test and not $_POST['test'].
This
> is
> > copy pasted from the results:
> >
> >       register_argc_argv Off Off
> >       register_globals Off Off
> >
> >
> > I'm completely stumped.
> >
> > Thanks in advance,
> > Damon

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

Reply via email to