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
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'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.