Skip to content
Advertisement

get two paths of images from database and loop them to display in slider

Im little bit stuck on a logic.scenario is i have a slider where two images are shown at a time taking 50%-50% part of screen,here is the simple html of it,

JavaScript

here every block contains two images i have shown only one.now i have trying to make it dynamic, but i didnt get any idea how it will work, so i created database with two tables, each for individual image in a single block.Both table have fields like simg_id(A_I),img_name,simg_path. here its my php on slider page.

JavaScript

now the problem is when i try to fetch path of image in slider, images are not changing one by one on both half of screen.instead it showing like both images from from both table top, another two images from both tables below 1st both, and so on , so full page is covered with images.

I know this idea of creating two tables for getting two images at once is silly,but i could not think any better.if any one can suggest any better way, it would be so helpful.

Update:getResultSet is function for mysql_query.

Advertisement

Answer

if anybody interested i found an answer for above question.

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement