Greenguy's Board

WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses WebcamWiz CRAZY $5,000 Reward Bonuses

Go Back   Greenguy's Board > Programming & Scripting
Register FAQ Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
Old 2006-10-18, 10:24 PM   #1
fucter
Rock stars ... is there anything they don't know?
 
Join Date: Sep 2006
Location: philadelphia
Posts: 18
Send a message via ICQ to fucter
autogallerySQL perl directive

Im trying to get a perl script to work that displays different banner ads randomly, so everytime I do a build I should have a diffrent banner ad

heres what I wrote:
Code:
#!/usr/bin/perl
my $range = 13;
  my $random_number = int(rand($range));

  $image[1]['pic']='example.banner.jpg';
  $image[1]['link']='http://some.domain';

$image[n]['pic']='example.banner.jpg';
  $image[n]['link']='http://some.domain';

 

print '<a href="'. $image[$random_number]['link']. '">';
print '<img src="'. $image[$random_number]['pic']. '"  border=0>';
obvioulsy, I left some links out and abbreviated them for 1 to n

well, this code doesnt work, i tried replacing 'print' with 'data .=' but that didnt work either (well, it sorta worked, the image and the link were the same for some reason.
Anyone have an idea what I am talking about, and how to fix it?
fucter is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

Forum Jump


All times are GMT -4. The time now is 06:45 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc