1.

Solve : Rotator Script Problems?

Answer»

rite, im new here, but i did do a search and nothing came up...

Im not great at all this computer talk, so i'll need to be guided through.

Im using dreamweaver, and i hve a site all up, yaadaahyaahdaah ...ultimatly its all good.

i have a Rollover image, and what i would like is that which i click on it ... it take you to a random page (from a list of 20ish preselected URLs)

i have a LOOK on internet and it was saying something about Rotator Script.

i have no idea what they are going on about?
how dod i do what i wana do?

thanks guys if you have KNOWLEDGE of PHP you could use the "rand" function, something like this:

Code: [Select]<?php
$num=rand(1,20);

if($num=="1"){
echo"<ahref=\"http://www.site1.com\"><imgsrc=\"image1.jpg\"></a>";
}
ELSEIF($num=="2"){
echo"<ahref=\"http://www.site2.com\"><imgsrc=\"image2.jpg\"></a>";
}
elseif($num=="3"){
echo"<ahref=\"http://www.site3.com\"><imgsrc=\"image3.jpg\"></a>";
}

etc
etc
?>
thanks for the reply.
unfortunatly i have no idea about PHP although i have heard it a LOT when researching how to do this ....

dont suppose there is a set-by-step guide tht you could give me ?Quote from: eonbar on May 04, 2008, 10:49:54 AM

thanks for the reply.
unfortunatly i have no idea about PHP although i have heard it a lot when researching how to do this ....

dont suppose there is a set-by-step guide tht you could give me ?

Not if you're unfamilair with PHP, sorry.

If you're serious about web design you may want to try an online PHP tutoria. Trust me, it's really not that hard.would something like this work? http://www.dynamicdrive.com/dynamicindex14/flexislide.htm
if it would work, you can add a function into the script to randomize it.

If you're just wanting a random text link, that's easy enough to do with a javascript. I've got a script I made a few years back that does that.


Discussion

No Comment Found