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 Link to comment https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/ 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 Link to comment https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/#findComment-987344 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? Link to comment https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/#findComment-987346 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. Link to comment https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/#findComment-987347 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']}"; ?> Link to comment https://forums.phpfreaks.com/topic/186976-somethings-is-wrong/#findComment-987348 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.