php database session handling in IE8

落花浮王杯 提交于 2019-12-24 14:27:45

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2568826/php-database-session-handling-in-ie8

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!