prakki79 Posted November 13, 2011 Share Posted November 13, 2011 Hi, I am newbie to PHP. If any one explain me with a simple example, it would be really great. I have a form page "queue_info.php". After user hits SUBMIT, this page will redirect to an action page "queue_action.php". from form page data are passed using "$quests=$_POST['quests'];" to this action page. Now i need to resend this same data back to the form page "queue_info.php" from action page. How to do this? Appreciate your inputs on this. thanks, prakash Quote Link to comment https://forums.phpfreaks.com/topic/251045-how-to-resend-data-from-action-to-form-page/ Share on other sites More sharing options...
denno020 Posted November 13, 2011 Share Posted November 13, 2011 You could do three things. One, send the variables back by appending them to the URL of queue_info.php. For example queue_info.php?id=5&from=user, then inside queue_info.php, you access those variables using $_GET, exactly as you've used $_POST. This means that the user will see all of the variables and their content, which may not be wanted. You could use javascript to submit another form on the queue_action.php page. Submit it to queue_info.php and access using $_POST again. Or the third is using session variables, which will then be accessible on any page in your website.. Hope that helps a little.. Denno Quote Link to comment https://forums.phpfreaks.com/topic/251045-how-to-resend-data-from-action-to-form-page/#findComment-1287769 Share on other sites More sharing options...
PFMaBiSmAd Posted November 13, 2011 Share Posted November 13, 2011 or you could put the form and the form processing code on the same page. Quote Link to comment https://forums.phpfreaks.com/topic/251045-how-to-resend-data-from-action-to-form-page/#findComment-1287780 Share on other sites More sharing options...
prakki79 Posted November 13, 2011 Author Share Posted November 13, 2011 Thanks guys for you inputs. I used the FORM post in the same page. It works. Quote Link to comment https://forums.phpfreaks.com/topic/251045-how-to-resend-data-from-action-to-form-page/#findComment-1287843 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.