The following code runs properly in the directory that is live, but in the one
that is used as
a staging area it treats the IF statement as if $image = 0, even though it
doesn't. Any ideas
why it would do this?
Thanks,
Jeremy
print '<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr height="40">
<td height="40" valign="top"><span
class="subhead">Gallery</span>';
// THUMB
print '<blockquote>
<table border="0" cellspacing="0" cellpadding="5"
bgcolor="#fce5db">
<tr><td>Choose from a thumbnail below to see a larger
image.</td>
</tr>
<tr>
<td>';
$thumbquery = "SELECT *
FROM productions_art
WHERE prodnu = $var";
$thumbresult = mysql_query($thumbquery) or die(mysql_error());
while ($thumb = mysql_fetch_array($thumbresult))
{
print '<a href="promo.php?image='.$thumb["galleryid"].'&var='.$var.'"><img
src="http://
www. mydomain.com/galleries/production/th_'.$thumb["file"].'"border="0"></a> ';
}
print ' </td>
</tr>
</table></blockquote>';
print '</td>
</tr>';
if(0!=$image)
{
$promoquery = "SELECT *
FROM productions_art
WHERE galleryid = $image";
$promoresult = mysql_query($promoquery) or die(mysql_error());
while ($promo = mysql_fetch_array($promoresult))
{
print ' <tr height="350">
<td align="center" valign="middle">
<table border="0"
cellspacing="0" cellpadding="3">
<tr>
<td><img
src="http://www.mydomain.com/
galleries/production/'.$promo["file"].'"border="0"></td>
</tr>
<tr>
<td><em>'.$promo["caption"].'</em></td>
</tr>
</table>
</td>
</tr>';
}
}
print ' </table>';