mvosoughi Posted April 20, 2006 Share Posted April 20, 2006 Hello all,I'm using the following code within the <form></form> tags to pass the variables to the next page:<?php foreach($_POST as $key=>$value){ if ($key!="submit"){ $value=htmlentities(stripslashes(strip_tags($value))); echo "\t<input type=\"hidden\" name=\"$key\" value=\"$value\">\n"; } } ?>It does work on my localhost but when I load the script to the webserver, which already supports php and I have many php codes running with no problem, it will not pass the variables to the next page. Is there anything that I'm missing?Thank you. Link to comment https://forums.phpfreaks.com/topic/7930-mutiple-page-form/ Share on other sites More sharing options...
AndyB Posted April 20, 2006 Share Posted April 20, 2006 Code looks fine. How are you retrieving the passed values on the [b]next[/b] page? If register_globals is OFF on your live server you'll need to retrieve passed values from the $_POST array on that next page. Link to comment https://forums.phpfreaks.com/topic/7930-mutiple-page-form/#findComment-28912 Share on other sites More sharing options...
mvosoughi Posted April 20, 2006 Author Share Posted April 20, 2006 AndyB, thank you for the reply. You were right, I wasn't retrieving the data ($_POST) currectly. It is working now.Thank you. Link to comment https://forums.phpfreaks.com/topic/7930-mutiple-page-form/#findComment-28916 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.