BrandonE97 Posted May 17, 2007 Share Posted May 17, 2007 When I do an update on a page and click on submit the page reloads and the values are inserted into the database but the old information is still shown on the next page. If I refresh then I get the updated info. What do I do so that the page has the updated info without having to refresh? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/51911-solved-page-update/ Share on other sites More sharing options...
Wildbug Posted May 18, 2007 Share Posted May 18, 2007 Do you SELECT the data before performing the UPDATE? If that's not the problem, maybe your browser is caching the old page instead of loading the new one. Quote Link to comment https://forums.phpfreaks.com/topic/51911-solved-page-update/#findComment-256305 Share on other sites More sharing options...
BrandonE97 Posted May 18, 2007 Author Share Posted May 18, 2007 Im using headers to keep the page from caching but yes I have a couple select statments so I can view the info then change it. Quote Link to comment https://forums.phpfreaks.com/topic/51911-solved-page-update/#findComment-256417 Share on other sites More sharing options...
Wildbug Posted May 18, 2007 Share Posted May 18, 2007 No, I mean on the submission page, or the submission action that triggers the UPDATE, do you have the SELECT statements preceeding the UPDATE statements? If so, you're getting old, pre-UPDATE data. Otherwise, this doesn't make sense, unless you have some kind of LOW PRIORITY or DELAYED conditional.... Quote Link to comment https://forums.phpfreaks.com/topic/51911-solved-page-update/#findComment-256449 Share on other sites More sharing options...
BrandonE97 Posted May 18, 2007 Author Share Posted May 18, 2007 Haha, I did have the select statements before my update statements. Thank you very much. I'm still pretty new to PHP/MySQL and didnt think about the code being a little backwards there. Thanks very much! Quote Link to comment https://forums.phpfreaks.com/topic/51911-solved-page-update/#findComment-256552 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.