delickate Posted April 2, 2010 Share Posted April 2, 2010 hi, I've a site named sgi-int.com it was running fine. i just switch the server. site is working fine but forms has stop working. each form is being submit but i can't receive a value. probably $HTTP_GET_VARS is not working there, in doubt i change it to $_REQUEST and print it as print_r($_ERQUEST). It receive only session. Then i tried to chagne method from "POST" to "GET", it start getting values. but some other issue arrise, I need to know that what could be the actual prob. how can i resolve this issue. you can see its work at sgi-int.com by creating an account. Please suggest solution as soon as possible if any Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/ Share on other sites More sharing options...
oni-kun Posted April 2, 2010 Share Posted April 2, 2010 Your old server most likely relies on register_globals setting which has been depricated for nearly ten years. Try running the function phpinfo(); and checking. An example of your code contains: <form name="quick_find" action="http://sgi-int.com/advanced_search_result.php" method="get"> So naturally you can access it through this on the appropriate page: $term = $_GET['quick_find']; If there is anything specific you need help on, I'm sure it'll be better for you and us if you can pinpoint the exact problems. Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/#findComment-1035759 Share on other sites More sharing options...
delickate Posted April 2, 2010 Author Share Posted April 2, 2010 Hi, Thanks for response. well, i've told that when do i change the method from post to get then it recieve form value and you can see in url, a long url makes. so i need to use method post, as it is now, but unable to receive form values, i've set register globel on but in vain, do you get my point? Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/#findComment-1035772 Share on other sites More sharing options...
harristweed Posted April 2, 2010 Share Posted April 2, 2010 try this: foreach($_POST as $name => $value) { echo "$name = $value<br />\n"; } in the receiving page and see what is displayed (with method = "post" ) Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/#findComment-1035777 Share on other sites More sharing options...
delickate Posted April 2, 2010 Author Share Posted April 2, 2010 thanks for quick reply. nothing is displaying now. what should i do? Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/#findComment-1035781 Share on other sites More sharing options...
harristweed Posted April 2, 2010 Share Posted April 2, 2010 change form to method = "get" Change foreach($_POST as $name => $value) { echo "$name = $value<br />\n"; } to foreach($_GET as $name => $value) { echo "$name = $value<br />\n"; } If that displays the values the problem could well be with your host not posting correctly Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/#findComment-1035799 Share on other sites More sharing options...
delickate Posted April 2, 2010 Author Share Posted April 2, 2010 well, Thanks for great help. i already told you that if i change method from post to get then it receive all the values. i've thousand of forms in my website, it is difficult to change all $HTTP_GET_VARS to $_REQUEST or $_GET, is there problem of register global? Quote Link to comment https://forums.phpfreaks.com/topic/197328-not-receiving-form-values-when-submit-it/#findComment-1035813 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.