Skip to main content
Inspiring
January 25, 2007
Question

Slideshow from a PHP/MySQl recordset

  • January 25, 2007
  • 1 reply
  • 445 views
Hi Folks,
Can anyone help me figure this one out?

I need create a slideshow from a MySQL databse containing image names. All the images are kept in one folder so there should be no address issues. The images will displayed in the same table cell. I have the database ready, the recordset created and I can display one image. My question is, how do I get the next image in the recorset to replace it after a fixed number of seconds. And then the next and so on....?

I have created similar things in the past using Kaosweaver's advanced random images extension but that doesn't seem to allow for images to be loaded from a recordset, which is a shame otherwise it would be perfect for this job.

I am only starting out on my PHP journey but I'm happy to try and piece together a simple bit of code if you can give me an idea what I should be looking at?
Any suggestions what other method or even other extensions I should try?

Cheers


Dave


This topic has been closed for replies.

1 reply

Inspiring
January 27, 2007
davecheet wrote:
> I need create a slideshow from a MySQL databse containing image names. All the
> images are kept in one folder so there should be no address issues. The images
> will displayed in the same table cell. I have the database ready, the recordset
> created and I can display one image. My question is, how do I get the next
> image in the recorset to replace it after a fixed number of seconds. And then
> the next and so on....?

You can't do it with PHP because PHP is a server-side language that
sends static (X)HTML to the browser. To display the images as a
slideshow, you need to use PHP to populate an array that is passed to a
JavaScript slideshow function.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/