# User shown Form Data and must OK before final submit



## vadershero (Dec 23, 2008)

Hi,
I've created a form that will use a php formailer and be hosted on a Linux server. It works great and I'm using it for a registration page. However, now as it's been up for several weeks I'm finding that people hit submit, then change their mind, go back and make a change and submit again. Some people are registering 3 or 4 times. Here's what I'd like to do. When they hit the submit button have a window or something like that open displaying thier currently selected options along with other reigistration info such as name and phone and email etc. In this window they could review thier answers and then either click an "OK" button which actually would act as the submit button now does and then moves them to my payment page and entering the information into my database. Or the option there of "Cancel" which would then close that window and allow them to make a change before doing it again until they're happy and can hit OK. This would solve all my multiple entries I would believe. I've searched all over the internet, but can't seem to find that answer. I've tried adding a "behavior" to the submit button, but I can only see a "Popup" option, but still submits the data through. I'm sure there's a way either with that submit behavior or perhaps a Javascript. 
Thanks for any help.
Scott


----------



## amanxman (Mar 28, 2006)

Hey,

This is the principal you need:

The first form is submitted to a page which displays the info that was populated into the fields.

On this second page, the OK button submits this second page with all the variables (which have been passed over from first page).

Basically you need to split it into two seperate sections.

So, for the first form, you need to pass the varaibles from that to another. You can do this using SESSION or passing the variables through URL.

Check out: http://mrarrowhead.com/php_tutorials_mah/php_passing_variables.php -- it looks quite old, but it covers both of the above.

Have a read of that and let us know if you need any actual code help (if so, pls post your code here)

Ta


----------



## maneetpuri (Oct 14, 2008)

Hi Scott,

What you will have to do will be, change the action to this form to some other php page. On this new PHP page you will have to again show the values entered by the users, plus there will be a form that will be created but will have all the fields hidden with values set to the what the user has submitted in the previous step. Now there will be two button on this page Submit and Edit Details. By clicking on submit you will have simply submit the form to form mailer to complete the registration whereas clicking on edit details should simply take the user back (javascript:history.back()) to the form filled where they can make edits as desired.

Hope this helps,

Cheers,


----------



## vadershero (Dec 23, 2008)

Thanks guys. Before I go and recode it I just want to make sure that if they hit the Cancel or back that all thier previous selections and filled out info will remain in tact so that they can just edit rather than re-enter.
Thanks,
Scott


----------

