Hey everyone. I am having some trouble with jquery and php.
First, I am calling a php file, called user_records.php, into my home page. On my home page, I have the following code:
- <script type="text/javascript">
- var auto_refresh = setInterval(
- function ()
- {
- $('#records').load('user_records.php').fadeIn("slow");
- }, 30000);
- </script>
So in the div with id records, I call and refresh the user_records.php page. In that user_records page, I have a mysql query that grabs a variable from the URL. My url looks like this: www.url.com?user=admin
Then based on the username, it runs the query. All of it works, but when it does the refresh, it stops grabbing the variable from the URL for some reason. I am not sure why this happens or if this is normal. I know the refresh code works, because I can run it on a different page that doesn't require a variable from the URL.
I hope someone can help. Thank you.