views:

151

answers:

2

I've got an html page from where Im making this call periodically:

function logon(id)
{
 $.get("data.php", { action: 'online', userID: id}, function(data){
  $("#msg").html(data);
 });
}

What this does is it calls this SQL script in data.php:

$sql = "update user_sessions set expires=(expires + 2) where userID = $userID";
mysql_query($sql, $conn) or die(mysql_error());
echo $sql;

I can see by the echo that the sql syntax and values are correct, but THE CHANGES TO THE expires FIELD ARE NOT DONE, ONLY IN IE8!! It works fine in other ff, safari, chrome, ie6 and 7.

There is nothing browser specific about making this sql call, but the user_sessions table is used to store PHP's sessions. Im only increasing the session expiry time when the call is made. What in IE8's session handling is preventing the session time from changing? Is there any caching or cookie problem that needs to be changed?

A: 

Download and install Fiddler to make sure the Ajax call is sent to the server. There might be some kind of ie8 JavaScript incompatibility that is preventing the Ajax from firing?.

Byron Whitlock
Other call to update the page ect. are working fine. And the echo $sql shows that the data received is correct.
psyb0rg
+2  A: 

Use .post to ensure caching isn't fouling things up.

webbiedave
This fixed it.Thanks.
psyb0rg