Hello everyone,
I'm working on a script so I can do "photo updates" for my website. Everything on the page is working amazingly, except for the part that displays the photos and extracts the captions from the mySQL database, which is the following lines of code:
$end = (($p * 10) + 1);
$start = (($p * 10) - 10);
$captionssql = "SELECT `photo`, `caption` FROM `updates_captions` WHERE `date` = '$datesql' AND `photo` >=" . $start . " AND `photo` <" . $end;
$captionresult=mysql_query($captionsql);
while ($array = mysql_fetch_array($captionresult)) {
$caption = $array['caption'];
$photo = $array['photo'];
echo "<p><img src='updates/" . $d . "/" . $photo . ".jpg' border='1'><br />";
echo $caption . "</p>";
}
For the record, $p is the page number, which is a simple number (i.e. 1, 2, 3, or 4).
Like I said, everything else on the page is working just fine, but the photos and captions aren't showing up. Any help would be GREATLY appreciated as this is a major part of the site I'm working on, and if I can't get it to work I'm in big trouble.
Thanks,
-Jon "Reality15" Roost
Webmaster of Michigan's Roller Coast