Portal Home > Knowledgebase > Articles Database > How to load another page on form submission


How to load another page on form submission




Posted by azayji, 01-24-2013, 03:32 AM
I want to load a new page on submitting the page and want to use the data from the previous page and then use this data in that page and further in another page.Also I want that an email is also sent carrying that data.

Posted by whamcp, 01-24-2013, 03:39 AM
You need to either use cookies or session variables to store temporary data.. (not recommended for this task though) Because this can be done like say, the second page that you post data to will have a hidden form with all data it received from first page, and will then pass on to third page..

Posted by Awesys, 01-27-2013, 02:12 AM
Another option would be to store those items in a database, and then the second page could query for those values.

Posted by creativeartist, 01-31-2013, 12:33 PM
You can do form POST and target as another page. POST contents in the form and get it in the target page and redner it. Thats all

Posted by RichardAskew, 01-31-2013, 12:39 PM
What language are we talking here? What have you tried? What errors are you getting?

Posted by mobilespecialists, 02-09-2013, 05:32 AM
If you want to check the data you can use: Form.php -> Form.php?...&submit -(if data ok)-> ThankYou.php, So not 3 pages but 2. Page 1 shows the form and sends the data to itself (so if errors no "go back" needed) and if everything is fine then redirects to page 2. The redirect can be established with header("Location: .../ThankYou.php"); Data you could send as $_GET in the Url, or as $_SESSION, or what you like, but DB seems a little risky if the users are not logged in (if you choose use Captcha). also in some cases with Ajax a JavaScript redirect with window.location.href is possible



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
High Latency at DNOW (Views: 652)

Language: