Jump to content

Cycle fixed image with random image?


BoarderLine

Recommended Posts

Hi All,

 

I am not entirely familiar with php and am trying to display an image on my site from a recordset which will reload every several seconds with a fixed(set) image.  Example: Random image from rs (time delay) set image (time delay) Random image from rs etc..

 

Currently I have the following code that is working well for displaying a random image however I want to change 2 things with it 1) as it is it only alternates on page refresh, so how would i make it alternate every several seconds? 2) How would I make it reload to a set image and alternate with an image from the database? 

 

SELECT ImageFile rand() as random_number
FROM clublistingpics
ORDER BY random_number DESC LIMIT 1

 

Thanks to anyone that can offer advise with this.

Link to comment
https://forums.phpfreaks.com/topic/137146-cycle-fixed-image-with-random-image/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.