Hey guys, im working on a database driven slide show and having a problem, the images in the slideshow aren't showing up. They show up when I run it as a static slideshow, and when I paste in my php code it breaks. I have no idea whats wrong with it. Here's the code of the identical working file, and the broken file.
- this is the code in the page.
var fadeimages=new Array()
<?php
$counter =0;
$slide = mysql_query("SELECT * FROM tbl_images");
while($row=mysql_fetch_array($slide)) {
echo "fadeimages[".$counter."] = 'images/".$row['img_photo']."';";
$counter++;
}
?>
- this is what the php prints on the page in the view source
var fadeimages=new Array()
fadeimages[0] = 'images/image1.jpg';fadeimages[1] = 'images/image2.jpg';fadeimages[2] = 'images/image3.jpg';
-the static code
var fadeimages=new Array()
fadeimages[0]="images/image1.jpg"
fadeimages[1]="images/image2.jpg"
fadeimages[2]="images/image3.jpg"
- this is what the static working code prints
var fadeimages=new Array()
fadeimages[0]="images/slideshow/image1.jpg"
fadeimages[1]="images/slideshow/image2.jpg"
fadeimages[2]="images/slideshow/image3.jpg"
I don't get any error's or anything with my php. and I have gone through everything i could think of, its probably a small mistake that im not picking up on.
thx in advance



Reply With Quote


Bookmarks