This might just be a small thing but i have no idea how to do it! I have a small bit of knowledge but not much!
I want a "random" banner to match up with it's link
so i want banner1 to associate with link 1 ect...
here's the code. anyone know what i am doing wrong? The banner is appearing as i want it to but the link is coming out like mysite.c0m/1 . The number is being posted to my domain name instead of a new link being create in a "a href" tag
anyone able to help?
thanks
JB
I want a "random" banner to match up with it's link
so i want banner1 to associate with link 1 ect...
here's the code. anyone know what i am doing wrong? The banner is appearing as i want it to but the link is coming out like mysite.c0m/1 . The number is being posted to my domain name instead of a new link being create in a "a href" tag
Code:
<?php
$num = rand(1,4);
$web = $num;
if ($num == "1") {
echo 'hxxp://vvv.xxxxxx.c0m/click-4232665-10489913?tid=1';
} else if ($num == "2") {
echo ' hxxp://vvv.xxxxxxxx.c0m/click-4232665-10489913?tid=2';
} else if ($num == "3") {
echo ' hxxp://vvv.xxxxxxxxx.c0m/click-4232665-10489913?tid=3';
} else if ($num == "4") {
echo ' hxxp://vvv.xxxxxxxxx.c0m/click-4232665-10489913?tid=4';
}
?>
//this then is where i am trying to post to....
<div id="ad"><a href="<?php echo $web; ?>" target="_blank"><img src="_aImages/_images/banner<?php echo $num; ?>.jpg" width="535" height="100" /></a></div>
anyone able to help?
thanks
JB