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 :/
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 = 'submit@domain.com';
$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...
Any help greatly appreciated.
Jay
MOD EDIT: bbcode tags modified; use PHP or HTML tags where applicable as it helps make the code easier to read/analyze via syntax highlighting.