stualk Posted October 31, 2008 Share Posted October 31, 2008 Hi guys, My first post on here in ages! I'm looking for some advice on form submission. The method i've been using for some time now is starting to cause me problems on one form in particular. I'll try my best to explain: Someone submits an enquiry on an item listed on a website. Their enquiry includes their contact info such as name, address, telephone, email etc. That goes into a db. The administrator is notified of this and adds costings to the enquiry, which then sends the customer an email asking them to confirm their acceptance. The email contains a simple 'CLICK HERE' which takes them to a form showing all the details they originally submitted along with the info the administrator has added. They can change any of the details they originally submitted as well as adding a purchase order number. When they click the submit button this is where the problems are occuring. I'm using the URL to send the info from EVERY editable field on the confirmation form and it seems as though it's too much for the URL to handle because I'm getting reports of the form 'freezing' and 'doing nothing' and 'going to just a blank white page' Is there some other way I can submit the edited info to the db to avoid this? I'm no expert, as you can probably tell (!), so any advice I would very much welcome. Quote Link to comment https://forums.phpfreaks.com/topic/130863-form-submission-advice/ Share on other sites More sharing options...
JonnoTheDev Posted October 31, 2008 Share Posted October 31, 2008 Use the database ID in the url to restore the data, not the actual values in the url. http://www.confirm.php?id=1 // get the data from table with id 1 // put data into form fields // after form complete update record id 1 Quote Link to comment https://forums.phpfreaks.com/topic/130863-form-submission-advice/#findComment-679210 Share on other sites More sharing options...
stualk Posted October 31, 2008 Author Share Posted October 31, 2008 Cheers - that's not a million miles from what i'm doing now, it's just that my current method involves sending other variables with the URL other than just '?id=x' at the end. What's the best way to update the values of id=x without adding them to the URL? Is there some sort of update function available for this? Quote Link to comment https://forums.phpfreaks.com/topic/130863-form-submission-advice/#findComment-679263 Share on other sites More sharing options...
JonnoTheDev Posted October 31, 2008 Share Posted October 31, 2008 1. Select the record from the database via the URL id 2. Put the database field values back into the form fields 3. Store the id in a hidden form field to retain the value 4. When the form is posted update the database record using the id in the WHERE claus Quote Link to comment https://forums.phpfreaks.com/topic/130863-form-submission-advice/#findComment-679279 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.