Code: Select all
<img src="<?php echo 'getimg.php?id=abc;?>" width="100" height="100">Code: Select all
<img src="" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">Code: Select all
<img src="<?php echo 'getimg.php?id=abc;?>" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">Code: Select all
<img src="<?php echo 'getimg.php?id=abc;?>" width="100" height="100">
<img src="<?php echo 'getimg.php?id=def;?>" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">
<img src="" width="100" height="100">I was testing the image each time to make sure it worked. The images showed up in FF just fine. They also showed up in IE just fine...
However, this is where I got stumped. When I refreshed the page in IE my session died and it took me back to my login page.
After investigating I found that in IE if you insert an image with a blank src="" for whatever reason your session variables die...?
Code: Select all
//No good in IE:
<img src="" width="100" height="100">Here is example code:
Code: Select all
<?php
session_start();
if(isset($_SESSION['MY_SESSION'])){
echo 'Session is Set';
}else{
echo 'Session is not set';
//SET SESSION
$_SESSION['MY_SESSION'] = 'Hello World';
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<img src="" width="100" height="100">
</body>
</html>Give it a try...