FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


Simple PHP Banner Rotator





robo_rat
A simple Banner rotator to randomly select a banner.

Code:
echo "<img alt='Random Banner' src='images/banner".rand(1, #).".jpg' border='1'>"


All you need to do is upload banners to the /images folder and name each one banner#.jpg. Modify the random number (#) to match the largest number on the banner file.
netpro
robo_rat wrote:
A simple Banner rotator to randomly select a banner.

Code:
echo "<img alt='Random Banner' src='images/banner".rand(1, #).".jpg' border='1'>"


All you need to do is upload banners to the /images folder and name each one banner#.jpg. Modify the random number (#) to match the largest number on the banner file.


how if file name is not banner#.jpg ??
example : mybanner.jpg, mypic.jpg, etc.
so I can make 'alt' same with file name each.
Related topics
Simple PHP Navigation
Phoenix free PHP scripts
Simple PHP forum code needed!
Simple PHP script not working
I need a VERY simple php script
another simple php request
Anyone care to help me with a simple PHP Form ?
30frih for a php rotator script
simple php to mysql form doesn't work
VERY simple php script needed
How to build simple PHP upload form
need help in a simple php register script based on flat file
[Completed]500 Frih$ for simple flash banner
Best WordPress Plugins for unfair advantage over others
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.