Jump to content

Need help in a PHP Mailer Form!!


GFXUniverse

Recommended Posts

Hi guyz.

 

I need to create a Booking System using form. same like this: https://www.theorytest.net/book-your-theory-test.php

 

Information will be sent to Email.

 

I know the form creation and sending to Email as well! But i this form is divided into pages how can i collect information that will be available to send through email at the end. (when user will complete this booking)

 

Waiting for your reply

Thanks

Link to comment
https://forums.phpfreaks.com/topic/227241-need-help-in-a-php-mailer-form/
Share on other sites

Hi,

 

I suppose it depends on what you have available.

 

If you have a database back end I would validate and store the information at each stage. Then once complete you can retrieve all of the required information from the database and send your email. This method will also mean that you can easily allow the user to go back and edit their details at various stages.

 

The other method would be to have hidden fields on the next stage and when you submit your form to stage 2 (for example) you populate the hidden fields with the $_POST items from stage 1.

 

I hope that this makes sense

 

Regards

Matt

You could use session variables to store the values along the way.

 

for example:

 

page 1 form will POST the info of the completed fields to page 2 and to store them in a session variable you do the following:

 

session_start();
$_SESSION['name'] = $_POST['name'];
//...
//...
//etc...

 

And for page 2 you do the same thing in page 3

PHPMailer is no longer being handled, so you are not likely to get any help from the SourceForge site. I have used PHPMailer a number of times on different servers, both Windows and *nix, and i have not run into the double-mailing you've described, so I'm afraid I have no words of wisdom for you based on the information you've provided us. If you want a more up-to-date mailer solution, you might want to consider Swift Mailer.

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.