Php problem! Please help!

SpaceshipSpaceship
NamecheapNamecheap
Namecheap AuctionsNamecheap Auctions
Watch

domain4u

We Buy We SellVIP Member
Impact
113
Hi

I want to make 1 banner appear on my site 50% of the time, the rest to appear RANDOMLY!

Anyone help me with this scrip in php please ?

Thanks.
 
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I'd do a simple rand() function imo..

Like making it rand(1, 100) and if the random number is above 50 then show the banner you want to show most, else show the all different random banners..
 
0
Close
i dont want to use the random function for the main banner, what i am looking is SHOW banner 1 50 % , Then show rest Randomly other 50% . There must be a way to do that!!??!
 
0
Close
domain4u said:
i dont want to use the random function for the main banner, what i am looking is SHOW banner 1 50 % , Then show rest Randomly other 50% . There must be a way to do that!!??!

he just told you how

think about the rand function, then incorporate into your code.
 
0
Close
You will get to do it using the rand function... like I said if the random number is over 50 then display the banner, else display any other banner.. if you make the rand(1, 100) then the main banner has a 50% chance of coming out.. ;)
 
0
Close
Working thanks.
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back