Hi all,
I have images stored in a folder. The metadata is in a database table.
I want to display a maximum of two images at random.
How is this done??
Here's my code so far...
$query = "SELECT images ".
"FROM home_images";
$result = mysql_query($query) or die(mysql_error);
// Display flowers
while($row = mysql_fetch_array($result))
{
if($row['images'] != "")
{
// filepath
$uploaddir = 'cms/uploads/home/';
$uploadfile = $uploaddir . basename($row['images']);
echo '<a class="p1" href="#"> '.
'<img src="'.$uploadfile.'" alt="img1" width="90" height="90" /> '.
'</a>';
} // end if
} // end while