php modification for a page
I got this part of php code I wanna incorporate in a .php file...it selects a random image:
<?php
global $value;
srand((double)microtime()*1000000);
$value = rand(0,1);
if($value==0){
$img="http://hiphopfranco.rapidenet.ca/sponsors/sponsor1.gif";
}
if($value==1){
$img="http://hiphopfranco.rapidenet.ca/sponsors/sponsor2.gif";
}
?>
and, lower
<a href="blop.html" target="_blank"><img src=<? echo($img); ?> width="468" height="60" border="0"></a>
I'm just trying to figure out where I should put this because the whole thing is ran by templates...
|