Thank you every 1!!! it all works except 1 part... that code wont work as an include.. WHY?!?! lmao plz respond.
I wrote about this on sitepoint.com quite awhile ago - hope it helps: http://www.sitepoint.com/article/picture-showcase-php-html
Just a suggestion, don't put an end ?> tag in the script (referring to this post: http://forums.digitalpoint.com/member.php?u=177972) That way you can't err and put a space or similar after it, because it isn't there. Also try not to use short tags, they're yucky. Dan
This should also work..... <?php $ban1 = "type banner url here"; $url1 = "type url here"; $ban2 = "type banner url here"; $url2 = "type url here"; $ban3 = "type banner url here"; $url3 = "type url here"; //etc. $randomNum = rand (1,3); //change the 3 to the amount of banners you have. //Select the banner of the random number $image = ${'ban'.$randomNum}; //Url of the random number $url= ${'url'.$randomNum}; //Prints out the link of the banner and the image of the banner Print "<a href=".$url." mce_href=".$url."><img src=".$image." border=0></a>"; ?> PHP:
have you tried putting an Iframe on the page you want the banner to display <iframe src="the randomiser page url here" width=200 height=200 noresize scrolling="no" align="left" frameborder="0"></iframe> HTML: just change width and height to your image size...maybe i'm not understanding all of this very well
I dont know much about templates structure of forum software, so I don't want to just guess which may result in forum layout corrupted. regards
this is aparently the old thread, the updated one is here http://forums.digitalpoint.com/showthread.php?t=926064
Its ok now mate... all sorted.. cheers for the help people. feel free to join http://www.xninelivesx.com/forums