JayNL Posted October 5, 2009 Share Posted October 5, 2009 Hi all, I have an HTML form that, once clicked on Submit, redirects to email.php that send me a neat email with all the info in it and shows the users a thank you page. Great, i'm pleased, it took me a week and im VERY new to this coding stuff. But... before it emails me the results i'd like to show the user a page with a summary of all the selections they made/entered in the form. Basically a printout of what i receive in the mail only on the site to give a user a chance to go back and make changes. I need the code for this, after a day of googling my head is spinning and i can't figure it out :/ Any help greatly appreciated. Jay Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/ Share on other sites More sharing options...
jon23d Posted October 5, 2009 Share Posted October 5, 2009 Instead of submitting to the email script, submit to an intermediary? Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930358 Share on other sites More sharing options...
redarrow Posted October 5, 2009 Share Posted October 5, 2009 show the current information on a page formated as it lands on there email accopunt, show the relevant forms that the user can change if need be. Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930390 Share on other sites More sharing options...
JayNL Posted October 5, 2009 Author Share Posted October 5, 2009 Instead of submitting to the email script, submit to an intermediary? I don't know what that is/does... show the current information on a page formated as it lands on there email accopunt, show the relevant forms that the user can change if need be. Isn't there a general code that can do this that i can edit? Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930426 Share on other sites More sharing options...
JayNL Posted October 5, 2009 Author Share Posted October 5, 2009 After more googling the only thing that keeps popping up is the use of hidden fields, is this something i need? Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930483 Share on other sites More sharing options...
jon23d Posted October 5, 2009 Share Posted October 5, 2009 form.php -> preview-confirmation.php -> process.php Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930487 Share on other sites More sharing options...
JayNL Posted October 5, 2009 Author Share Posted October 5, 2009 That's the idea yes Do you have code that can make that happen? Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930491 Share on other sites More sharing options...
jon23d Posted October 5, 2009 Share Posted October 5, 2009 No, I don't even know what you are working with now... Try writing it? You will learn more and be better-prepared for future work. Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930496 Share on other sites More sharing options...
JayNL Posted October 5, 2009 Author Share Posted October 5, 2009 I can't write it, what i have so far is compiled out of code samples etc i found online :/ The form is in HTML, the thank you page (that also sends the form to me) is PHP. The form links to the thank you page with this: <form action="" METHOD="POST" name="SubmitForm" class="news" id="SubmitForm"> <input type=hidden name="subject" value="Submitted Form"> <input type=hidden name="redirect" value="http://www.domain.com/thankyou.php"> The thank you page looks like this: <?php session_start(); ini_set('display_errors',0); if(!$_SESSION['postDATA']) header("location: SubmitForm.php"); $msg = " Your name: ".$_SESSION['postDATA']['Name']." Your email: ".$_SESSION['postDATA']['Email']." Your address & appartment: ".$_SESSION['postDATA']['Address'].' '.$_SESSION['postDATA']['Appartment']." Type: ".$_SESSION['postDATA']['Type']; //prep mail $from = $_SESSION['postDATA']['Email']; $to = '[email protected]'; $subject = 'Form Submit'; $message = $msg; mail($to, $subject, $message, "From: $from"); unset($_SESSION['postDATA']); ?> This all works i just need to have a page inbetween that summarizes... Link to comment https://forums.phpfreaks.com/topic/176494-php-summary-and-confirmation-page/#findComment-930502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.