By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,559 Members | 1,150 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,559 IT Pros & Developers. It's quick & easy.

Page Refresh problem

P: 1
hi,
i have a page refresh problem , when the page is refreshed the last query or the command gets executed, is this problem something to do with cookies.please reply.
thanks
Apr 2 '07 #1
Share this Question
Share on Google+
2 Replies


P: 8
hi,
i have a page refresh problem , when the page is refreshed the last query or the command gets executed, is this problem something to do with cookies.please reply.
thanks
just put the conditions:
like
if($submit)
{
#connect to mysql
#select the specified database
#query
}

i am not sure that this will help u or not.
Apr 2 '07 #2

P: 14
I'm not sure I get you correctly, but I use to have the same problem with some table output (from a PHP call to a MySQL database) not refreshing, despite the page autoloading every 5 minutes. I didn't exactly do a lot of research to figure out the problem, but assumed it was a problem with the local cache settings, as I could force the reload by doing 'shift-Refresh', but a simple refresh/reload would not update the page -- it just recalled the information from the cache.

I got around this by simply call a random number and putting it in the URL. So for instance links to the page call

mycachedpage.php?randnum=120394820938

The number would be a variable like $randomreset created by the rand() function.

Similarly, if the page is autorefreshing every few minutes, then part of the PHP would be to create a random number, save this as a variable and then when the meta tag reloads the page, it would think it is reloading a brand new URL. You don't have to actually do anything with the number passed in the URL. It's just to make the browser think new important data or a new URL is being called.
Apr 2 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.