Jump to content

PHP summary and confirmation page


JayNL

Recommended Posts

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

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?

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...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.