Here's the portion of the code in question and the html is a print request on the same page:
//display gallery name for use from the referring page where the gallery is selected
$gallery = mysql_query("SELECT gallery_name FROM galleries WHERE id='$galleryid'");
$galleryarray = mysql_fetch_assoc($gallery);
// main portion of script with problem
$image = mysql_query("SELECT * FROM artworks WHERE userid='$id' AND galleryid='$galleryid'");
$folder = mysql_query("SELECT * FROM artworks WHERE userid='$id' AND galleryid='$galleryid'");
if ((mysql_num_rows($image)<=0))
echo "Sorry that gallery doesn't exist!";
//while ($row = mysql_fetch_assoc($image))
$row = mysql_fetch_assoc($image);
{
//set up integer counting of items in folder
$i = intval($row['i']);
$c = 0;
$p = $row['folder']."/".$row['location'];
if ($i==$c)
$c++;
if (strlen($p)>0)
{
$i1 = ($i+$c-1);
$i2 = ($i+$c+1);
print
// the + (plus sign) is a hyperlink for the next image id and the - (minus sign) is for the previous one
"<a href=\"player.php?i=$i1\">-</a> "
."<img src=\"$p\" border=\"0\" width=\"$width\" "
."<a href=\"player.php?i=$i2\">+</a><br\>\n";
}
}


Sign In
Create Account

Back to top









