salguod Posted July 26, 2011 Share Posted July 26, 2011 Hey everyone. I'm having a bit of an issue, but not sure if it is MySQL or PHP. Basically, if someone has filled out a form before on the webpage, when they click send (for another instance), it is not posting the new information into the database. Once the send button is pushed, it re-sends the previous entry. I'm thinking there is some cache issue, but I'm not sure what kind of code to use to clear the cache before/after the send button is pushed. Sorry if this doesn't make much sense, but it's a little hard to explain. Any ideas? Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/242884-mysqlphp-cache-problem/ Share on other sites More sharing options...
fenway Posted July 26, 2011 Share Posted July 26, 2011 How can it do something on send and then sometimes not? I'm confused by your description Quote Link to comment https://forums.phpfreaks.com/topic/242884-mysqlphp-cache-problem/#findComment-1247550 Share on other sites More sharing options...
requinix Posted July 26, 2011 Share Posted July 26, 2011 Are you sure it's resubmitting the data rather than, say, simply not updating at all? Quote Link to comment https://forums.phpfreaks.com/topic/242884-mysqlphp-cache-problem/#findComment-1247551 Share on other sites More sharing options...
salguod Posted July 26, 2011 Author Share Posted July 26, 2011 Sorry again for the description. Let me see if this helps: Someone goes to the page for the first time and submits the form, the info is posted into the db and an email is sent to the admin that shows a link to the form info. The link ends with the user id which should be different with every post. ie. http://site.com/forms/form.php?id=152 If the same user goes back to the site and submits a form it should assign the new form a different id number, but instead edits the data for that user in the db (152), and sends email with the same link as above. However, if the user hit ctrl f5, or cleared their browser cache it would assign a new id, and everything works fine. Does that help? Quote Link to comment https://forums.phpfreaks.com/topic/242884-mysqlphp-cache-problem/#findComment-1247563 Share on other sites More sharing options...
fenway Posted July 27, 2011 Share Posted July 27, 2011 Then you're storing that ID is a session, improperly -- just guessing. Quote Link to comment https://forums.phpfreaks.com/topic/242884-mysqlphp-cache-problem/#findComment-1247655 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.