Can someone Explain where to insert this banner rotater code?

ycfme

Power Member
Joined
Mar 24, 2010
Messages
780
Reaction score
66
I'm thinking of using this banner rotator script :
HTML:
http://www.pro-dezign.com/how-to-php-banner-rotator.html

I'm clear where this should go:
PHP:
<?php include ("banner-rotator.php"); ?>

I am not however clear where to insert this code:

PHP:
<?php
$Img1 = "http://www.(the source of the image)";
$Alt1 = "[advertisement] (place your alt text here)";
$Url1 = "http://www. (the url of the link)";

$Img2 ="http://www.pro-dezign.com/images/banner.jpg";
$Alt2 = "[advertisement] pro-dezign web development";
$Url2 = "http://www.pro-dezign.com/index.html";

$num = rand (1,2);

$Image = ${'Img'.$num};
$Alt = ${'Alt' .$num};
$URL = ${'Url'.$num};

Print "<a href=\"".$URL."\"><img src=\"".$Image."\" alt=\"".$Alt."\" /</a>"; ?        >



Also what does this line do?
PHP:
<a href=\"".$URL."\"><img src=\"".$Image."\" alt=\"".$Alt."\" /</a>"; ?


Thanks!
 
Last edited:
PHP:
Print "<a href=\"".$URL."\"><img src=\"".$Image."\" alt=\"".$Alt."\" /</a>"; ?        >
This would go where you want the banner displayed.

PHP:
<a href=\"".$URL."\"><img src=\"".$Image."\" alt=\"".$Alt."\" /</a>"; ?

This is the actual part of the code that would display the banner. Using the above image link/linking url/alt tag.
 
Back
Top