Thumbnail slider

Hello All,

Here is a thumbnail slider,at the top of page.

There images are pushed there by linking to individual files from a directory.
I want to use this for images but the images should be pulled from database.
Please suggest query needs to be implemented here. i can get the data but how to display this in slider.


Show us the code you’ve attempted. (Getting the data; how you’re storing it, etc.)

What I have done for a JavaScript gallery ( I have not checked the code for this one ) is where there is a list of images replace it with a php array created from glob()

Javescript could be a list say:


I would replace this with something like this - untested:

$filenames = glob( directory "*jpg")
foreach ( filenames as $value ){
echo "<li>$value</li>";