Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Closed Thread
Old 04-25-2005, 12:04 AM   #1 (permalink)
 
Junior Techie

Join Date: Dec 2004

Posts: 74

SovietX

Default Random Affiliate Script

Hi,

I am able to make the buttons appear in different positiosn each time, however on each refresh the buttons stay the same only in different order.

Can anyone help me?

<THE CODE>

<?
$display = 5;
$banner[] = "<img src=imgs/bm88x31.gif border=0>";
$banner[] = "<img src=affiliates/isk0.gif border=0>";
$banner[] = "<img src=affiliates/insolence.gif border=0>";
$banner[] = "<img src=affiliates/justavision.gif border=0>";
$banner[] = "<img src=affiliates/sudden.gif border=0>";
$banner[] = "<img src=affiliates/jasonz.gif border=0>";
$banner[] = "<img src=affiliates/hyo.gif border=0>";
$banner[] = "<img src=affiliates/vinom.gif border=0>";
$banner[] = "<img src=affiliates/vinomt.gif border=0>";
$banner[] = "<img src=affiliates/zen.gif border=0>";

$said = 1;
while($said <= $display){
$random = rand(1, $display);
if($random != $banners[$random]){
echo "$banner[$random]";
$banners[$random] = $random;
$said += 1;
}

}
?>
SovietX is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On