I am trying to create a popup slideshow. Everything seems to check out but no data is displayed in the popup window except for the info passed in the querystring. (ie $listingnumber in title is correct). Can anyone show me where I am going wrong? I am Stumped.
The formatting shows but no images or text. Also $id remains blank. AAAAAAAAAAAAAarggh!! What am I doing wrong??![[sadeyes] [sadeyes] [sadeyes]](/data/assets/smilies/sadeyes.gif)
<html>
<head>
<title>Listing <? echo $listingnumber ?>Slideshow</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
a {color:660000; font-family:georgia; font-size:13px; font-weight:bold}
a:hover {color:8C8C8C}
-->
</style>
</head>
<body>
<table width="95%" border="0" cellspacing="1">
<tr align="center" valign="top">
<td>
<table width="80%" border="0" cellspacing="1">
<tr>
<td><div align="center"><IMG SRC="<?php echo $image;?>" border="1" width="350" height="300" alt="sorry image not available"></div>
</td>
</tr>
<tr>
<td><div align="center"><?php echo $temp[caption][$id];?><?php echo $id; ?></div>
</td>
</tr>
<tr>
<td><div align="center">
<a href="javascript:history.back()"><<<</a>
| <a href="view_images.php?listingnumber=<?php echo $listingnumber; ?>&id=<?php echo $id; ?>">>>></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
$dbh=mysql_connect ("HOSTNAME", "USERNAME", "PASSWORD"
or die ('I cannot connect to the database because :'. mysql_error());
mysql_select_db ("DATABASE", $dbh);
$result = @ mysql_query("SELECT caption, imgname FROM directho_.listing_images WHERE listingnumber = $listingnumber"
;
if ($result)
{
$rows=mysql_num_rows($result);
$temp=array();
for ($i=0; $i<$rows; $i++)
$temp[]= mysql_fetch_array($result);
$uploaddir = "/listing_images/" . $listingnumber . "/";
if ($id==""
{
$id=0;
}elseif ($id==$rows){
$id=0;
}else{
$id=($id+1);
}
$image = $uploaddir.$temp
[$id];
}
else
{ print "Sorry there are no pictures on this listing: $listingnumber<br><br>";
}
MYSQL_CLOSE();
?>
</body>
</html>
The formatting shows but no images or text. Also $id remains blank. AAAAAAAAAAAAAarggh!! What am I doing wrong??
![[sadeyes] [sadeyes] [sadeyes]](/data/assets/smilies/sadeyes.gif)
<html>
<head>
<title>Listing <? echo $listingnumber ?>Slideshow</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
a {color:660000; font-family:georgia; font-size:13px; font-weight:bold}
a:hover {color:8C8C8C}
-->
</style>
</head>
<body>
<table width="95%" border="0" cellspacing="1">
<tr align="center" valign="top">
<td>
<table width="80%" border="0" cellspacing="1">
<tr>
<td><div align="center"><IMG SRC="<?php echo $image;?>" border="1" width="350" height="300" alt="sorry image not available"></div>
</td>
</tr>
<tr>
<td><div align="center"><?php echo $temp[caption][$id];?><?php echo $id; ?></div>
</td>
</tr>
<tr>
<td><div align="center">
<a href="javascript:history.back()"><<<</a>
| <a href="view_images.php?listingnumber=<?php echo $listingnumber; ?>&id=<?php echo $id; ?>">>>></a></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<?php
$dbh=mysql_connect ("HOSTNAME", "USERNAME", "PASSWORD"
mysql_select_db ("DATABASE", $dbh);
$result = @ mysql_query("SELECT caption, imgname FROM directho_.listing_images WHERE listingnumber = $listingnumber"
if ($result)
{
$rows=mysql_num_rows($result);
$temp=array();
for ($i=0; $i<$rows; $i++)
$temp[]= mysql_fetch_array($result);
$uploaddir = "/listing_images/" . $listingnumber . "/";
if ($id==""
$id=0;
}elseif ($id==$rows){
$id=0;
}else{
$id=($id+1);
}
$image = $uploaddir.$temp
}
else
{ print "Sorry there are no pictures on this listing: $listingnumber<br><br>";
}
MYSQL_CLOSE();
?>
</body>
</html>