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

Link to comment
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.

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

Link to comment
Share on other sites

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.

 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

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