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' 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:[EMAIL PROTECTED]

Attachment: php.ini.zip
Description: Zip compressed data

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

Reply via email to