Hi,
I have a database with a field called 'thumbnail'. In that field I hold the destinations to various pictures held on the server. i.e. /name/images/pic1.jpg
What I would like to do is to create a small slide show to display all the photos in my database.
I can extract them from the database ok (as you will see below) but what is happening is that they are all being extracted and displayed at the same time.
What I need is that only one picture is displayed and then then next and so on.
Any help would be greatly appreciated.
Here is the code so far.....
<?php
include ("********");
$connection=mysql_connect($host,$user,$password)
or die ("Couldn't connect to server.");
$db=mysql_select_db($database,$connection)
or die ("Couldn't select a database.");
$query="select * from table WHERE field='live' ORDER BY Rand()";
$result=mysql_query($query)
or die("Couldn't execute query.");
while ($row=mysql_fetch_array($result))
{
extract($row);
echo "<center><div align='center'>
<marquee bgcolor='#ffffff' direction='left' loop='true' width='35%' >
<center> <font color='#ffffff' size='+1'><strong>
<img src='$thumbnail' border='0' alt='thumbnail' height='50' width='60'>
</strong></font> </center> </marquee></div></center>";
}
?>