Hi, I'm trying to make a simple slideshow with forward and back buttons that change the image inside a div in php. When I press the "further" button, it jumps from index[0] to index[1] and never shows the first image. Then when I click more it doesn't go forward. When I click back, it goes back to a black screen div. Any help getting this to work is GREATLY appreciated because I've been trying for 2 days with tutorials and can't get it. Thanks. Derek
Here are the php parts that are relevant, my page was too large and confusing to include.
first, the $background array where I store my images.
Code:
$background = array
(
"<img src='sundragon_environments/ocean/ocean1_FRAME.jpg'/>",
"<img src='sundragon_environments/ocean/ocean1_FRAME2.jpg'/>"
);
then the code to move the images forward and backwards if the buttons are pressed.
Code:
then the code to move the images forward and backwards if the buttons are pressed.
and now to echo out the images inside the div.
Code:
<div id="background"><?php echo $currentBackground;?></div>
|