I’m using Crossslide image gallery, and here is my image javascript file code which is connected to the index.php (which only has an ad_image div for the gallery)
$(function() {
$('#ad_image').crossSlide({
sleep: 5,
fade: 2
}, [
{ src: 'images/slideshow/1.jpg' },
{ src: 'images/slideshow/2.jpg' },
{ src: 'images/slideshow/3.jpg' }
])
});
I set up a database table screen_image in phpmyadmin, and would like to get images(eg 1.jpg, 2.jpg) from database rather than from the code above. The reason for doing so is that I am planning to build a backend/admin for it later on.
How do I go about connecting the Javascript file above to database using php? I’m new to this php/backend so a bit detailed explanation/coding would be very helpful.
Thank you for your help.
Regards
S:)
Suppose this is your image.php page
this code will go like this in this script tag