dezkit Posted January 2, 2010 Share Posted January 2, 2010 Hello freaks, I have a problem, I have 2 files in 2 different servers, same host, when I use them on different hosts they both have different results. 1.php <form method="post" action="2.php"> <input type="text" name="text"> </form> 2.php <?php echo "sup $text"; ?> When I insert blah in webserver#1 1.php, 2.php says "sup blah" When I insert blah in webserver#2 1.php, 2.php says "sup " Why does this happen? How do I enable webserver#2 to be like webserver#1? Thank you Quote Link to comment Share on other sites More sharing options...
Mchl Posted January 2, 2010 Share Posted January 2, 2010 http://php.net/manual/en/security.globals.php Quote Link to comment Share on other sites More sharing options...
dezkit Posted January 2, 2010 Author Share Posted January 2, 2010 I knew that was the problem, how do I enable it? Quote Link to comment Share on other sites More sharing options...
dezkit Posted January 2, 2010 Author Share Posted January 2, 2010 Nevermind i found it in the php.ini quick config, thank you. Quote Link to comment Share on other sites More sharing options...
Mchl Posted January 2, 2010 Share Posted January 2, 2010 Bu turning appropriate option to on in php.ini http://www.php.net/manual/en/ini.core.php#ini.register-globals However, as stated in article above you should NOT enable it. Instead use $_POST array like this: <?php echo "sup {$_POST['text']}"; ?> Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.