Jump to content

[SOLVED] form to mysql - confirmation page?


dinvinci

Recommended Posts

What is the best way to accomplish this? I can think of some ways but want to choose the most efficient. A user will fill out this form:

 

http://jwchendersonville.org/referral.php

 

And then when they click submit they would get a confirmation page looking something like this:

 

http://jwchendersonville.org/confirmation.php

 

Then they could click a "Confirm submission" button to complete the process, or else go back and correct anything they need to.

 

Would I send these referrals to a different table, or to the same table but with a field named confirm set to a special value...  ???

 

TIA!

Link to comment
https://forums.phpfreaks.com/topic/74588-solved-form-to-mysql-confirmation-page/
Share on other sites

Don't post it to the database until they click on confirm.  Just make a button/link that takes the user back to the previous page using their browsers back button.  If I remember correctly, it is:

<a href="javascript:history.back(1)">BACK</a>

  That is the simplest way to do it.

Don't post it to the database until they click on confirm.  Just make a button/link that takes the user back to the previous page using their browsers back button.  If I remember correctly, it is:

<a href="javascript:history.back(1)">BACK</a>

  That is the simplest way to do it.

He's taking about the best way too put the information in his database.

I'm a "she"  ;D

 

I figured it out. Before submitting to the database, I send the user to a confirmation page which lists all the fields they entered on the previous page, nicely formatted. The code looks like this:

 

echo "<td>".$_POST['child1name']."</td>";

 

Then I have that same value in a hidden form field like this:

 

<input type="hidden" value="<? echo $_POST['child1name']?>" name="child1name">

 

The user can either hit back to go change anything, or click Confirm to put all the hidden fields into the database. It works great.

 

 

 

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.