I use the code of this page to display a slide show of several images:
http://www.dynamicdrive.com/dynamicindex14/leftrightslide.htm
now this works when you have always the same images. But I know want to make that the images are loadedd dynmaically from a database.
How can I achieve that? basically the parts below should be fetched from the database this way:
$result = mysql_query("select * from images");
while ($row = mysql_fetch_array($result))
{
print $row["image"];
}
now I want to combine it with this (so that it is dynmaically always adds 1,2, 3...etc depending on how many images they are.
//Specify the slider's images
var leftrightslide=new Array()
var finalslide=''
leftrightslide[0]='<a href="http://"><img src="dynamicbook1.gif" border=1></a>'
leftrightslide[1]='<a href="http://"><img src="dynamicbook2.gif" border=1></a>'
leftrightslide[2]='<a href="http://"><img src="dynamicbook3.gif" border=1></a>'
leftrightslide[3]='<a href="http://"><img src="dynamicbook4.gif" border=1></a>'
leftrightslide[4]='<a href="http://"><img src="dynamicbook5.gif" border=1></a>'
how can achieve that?
thanks