id integer unsugned auto_increment primary key,
url varchar(20)
);
В url записываем значения типа: image1.gif, image2.gif, image3.gif и т.д.
mysql_connect('host', 'user', 'password');
mysql_select_db('database');
$sql = "SELECT url FROM photo";
$result = mysql_query($sql);
$image_path = "images/";
while ($row = mysql_fetch_array($result))
{
echo "<img src='" . $image_path . $row['url'] . "'>";
}
mysql_connect('host', 'user', 'password');
mysql_select_db('database');
$sql = "SELECT url FROM photo";
$result = mysql_query($sql);
$image_path = "images/";
while ($row = mysql_fetch_array($result))
{
echo "<img src='" . $image_path . $row['url'] . "'>";
}
another try
<?php
mysql_connect('localhost', 'gmarik', 'Photoshop6');
mysql_select_db('aB');
$query = mysql_query("select url,desc from photo limit 0, 16");
while($row = mysql_fetch_array($query){
echo "<img src='$row[0]'><br>$row[1]";
};
?>
I want to build a mysql driven photo album, with thumbnails and links to a php page with the big photo. any ideas?