So I have two pages:
photo.php - which calls on the album thumbnails and seems to work successfully. Although, I believe I am using amateur coding.
Code: Select all
$con = mysql_connect("...","...","...");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("...", $con);
$result = mysql_query("SELECT * FROM photo_albums ORDER BY uptime DESC");
while($row = mysql_fetch_array($result))
{
echo '<div class="photoThumb">';
echo '<a href="viewAlbum.php?aid='.$row['aid'].'"><img src="' . $row['filepath'];
echo $row['filename'] . '"';
echo 'border="0" /></a>';
echo '<br/>';
echo '<span class="thumbText"><a href="viewAlbum.php?aid='.$row['aid'].'">' . $row['stitle'];
echo '</a><br/>';
echo $row['photog'];
echo '</span>';
echo "</div>";
}
mysql_close($con);
Code: Select all
$con = mysql_connect("...","...","...");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("...", $con);
$result = mysql_query("SELECT *
FROM `pictures` WHERE `aid` = 1 ORDER BY `pid` ASC");
while($row = mysql_fetch_array($result))
{
echo '<div class="photoThumb">';
echo '<a href="';
echo $row['filepath'];
echo $row['filename'];
echo '"><img src="';
echo $row['filepath'];
echo $row['filename'];
echo '" rel="lightbox[' .$row['aid'];
echo ']" border="0" width="100px" /></a><br/>';
echo "</div>";
}
mysql_close($con);
How do I make just the album the user clicked on display?
Also, does any one know how to get the lightbox to work?
Code: Select all
echo '" rel="lightbox[' .$row['aid'];Thanks for the time,
Brian