madk:
I wrote a small image rotator in php and it is used at my site (www.beadhaven.com). I don't use it for the main header but for the smaller banner beneath. I have mine setup so that I manually have to add the links to an array but you could easily remove this if you are just looking to display a banner. Just name images 1.jpg, 2.jpg etc.
<? //start of random image rotator thingy
$file_type = ".jpg";
$image_folder = "../../images/banners";
$start = "1";
$total = "6"; // total number or images
$links = array("null",
"index.php?main_page=index&cPath=175", //1
"index.php", //2
"index.php", //3
"index.php", //4
"index.php?main_page=index&cPath=12_7_179_182", //5
"index.php?main_page=infopages&pages_id=32"); //6
$random = mt_rand($start, $total);
$image_name = $random . $file_type;
// echo html
echo "<a href = \"$links[$random]\"><img src=\"$image_folder/$image_name\" width = 460 height = 125 border = 0></a>";
?>
Can you please give a little instruction on how to use this? I put it in the "html text" field of the banner manager in ZC admin. My ZC is installed in a folder named "shop" so I added that to the image path in your code. It flashes an image (with a blank image) box but then disappears and leaves "; ?> in it's place.
I uploaded six images, named 1-6.jpg respectively, to the shop/images/banners directory on our site.
Can you tell me what I'm doing wrong?
Thanks in advance for any help.
Rebekah
**TheWindCutter.com**
Professional Microphone Windscreens
*Got wind noise? We've got you covered. *