dinvinci Posted October 24, 2007 Share Posted October 24, 2007 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! Quote Link to comment https://forums.phpfreaks.com/topic/74588-solved-form-to-mysql-confirmation-page/ Share on other sites More sharing options...
djpic Posted October 24, 2007 Share Posted October 24, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/74588-solved-form-to-mysql-confirmation-page/#findComment-377072 Share on other sites More sharing options...
only one Posted October 24, 2007 Share Posted October 24, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/74588-solved-form-to-mysql-confirmation-page/#findComment-377074 Share on other sites More sharing options...
dinvinci Posted October 24, 2007 Author Share Posted October 24, 2007 I'm a "she" 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. Quote Link to comment https://forums.phpfreaks.com/topic/74588-solved-form-to-mysql-confirmation-page/#findComment-377128 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.