Re[2]: [PHP] please help!!

From: Date: Sun, 26 May 2002 09:19:49 +0000
Subject: Re[2]: [PHP] please help!!
Groups: php.general 
Request: Send a blank email to php-general+get-99288@lists.php.net to get a copy of this message
Hello Jolly, Sunday, May 26, 2002, 10:58:45 AM, you wrote: JN> Olexandr, JN> <?PHP JN> /* I can get the values from these */ JN> foreach ($HTTP_POST_VARS as $var => $value) { JN> echo "$var = $value<br>\n"; JN> } JN> /**************************/ JN> /*however empty for this sentence*/ JN> echo "equals ".($t1+$t2); JN> /**************************/ JN> echo "<form action='$PHP_SELF' METHOD='POST'>\n"; JN> echo "<input type='text' name='t1'>\n"; JN> echo "<input type='text' name='t2'>\n"; JN> echo "<input type='submit' name='Submit' JN> value='Submit'>\n"; JN> echo "</form></p>\n"; ?>> JN> P.S. I have set "register_globals = On", but still not work JN> The attached files are my config files of php and apache! I looked through your configuration files and didn't notice any serious differences between them and my ones. I have PHP 4.2.1/Apache 2.0.36 on WinXP Pro. My register_globals was off. When I made it On your scipt worked properly. I don't know what the reason. What PHP you have? I attached my php.ini. Maybe you can find some important things. Another one question: does $PHP_SELF give proper value? It must not be set if register_globals=off. So if $PHP_SELF is set to some value, then global variables are registered. And the last question: why do you use global variables? It's much easier to use superglobal arrays $_POST, $_SERVER, etc. They guarantee that any values passed to your script won't be mixed. -- Best regards, Olexandr mailto:supaboy@i.com.ua

Attachment: [application/x-zip-compressed] php.ini.zip
« previous php.general (#99288) next »