Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
Thread: Add preview to form submission
12-23-2008, 06:18 AM #1
- Join Date
- Dec 2008
- Thanked 0 Times in 0 Posts
Add preview to form submission
Thanks for any help.
12-23-2008, 03:19 PM #2
- Join Date
- Jun 2003
- Cottage Grove, Minnesota
- Thanked 1,072 Times in 1,063 Posts
It sounds like they can fill out a form and make payment(s) without
any email validation. That means you really have no control over a person
leaving the site and coming back before they get to the payment page.
Having an intermediate "confirm" form page really does no good. They can still
confirm it and exit your site before they pay anything. You have no idea of
who they are. In effect, they are really not registering.
In most cases, they need to register with a valid email address, username.
You make them view their email to see the temporary password that they can
change once they've returned to your site.
It then follows along these lines ...
Check for a PHP SESSION, if not set,
Let them fill out the form and click submit.
If a SESSION is set, that means they have previously logged-in. Open a form
with their data from the database. They can edit or continue to payment.
If they try to re-register ...
If the email address they use is already taken, that means the person
has already registered, so ask them for a username and password to
If they're visiting the form for the first time ...
Create an ID for them in MySQL and save their info, then start a PHP SESSION at that time.
Go through the operation of validating the email and giving them a temporary password.
Now, the PHP SESSION is their ID and is set.
If they abort before payment, you have their information stored, even if they leave
and come back the next day.
For the email part, you don't have the form sent to you ... you have an email sent
about a "new user" and their ID. You only get one email for each user because it
only gets sent when they register (which can only happen 1 time).