<?php
while($query_row2=mysql_fetch_array($result))
{
$res=mysql_query("SELECT * FROM images WHERE er='".$query_row2['er']."' ORDER BY `sr` DESC") or die ("Error");
$q=mysql_fetch_array($res);
$_SESSION["id1"]=$q['iname'];
?>
<img src="xyz.php" height="50" width="100"/>
<?php
}
?>
xyz.php 包含:
<?php
include("connection.php");
session_start();
$z= $_SESSION["id1"];
header ("Content-type:image");
echo $z;
?>
此代码显示为第一个 $query_row2['er'] 存储的相同图像......并且所有图像都显示相同..