NamePros
Welcome, Guest! Ready to make a name for yourself in the domain business? We welcome both the hobbyist and professional domainer to join the discussion as part of the NamePros community.

Click here to create your profile to start earning reputation for posting, and trader ratings for buying & selling in our free e-marketplace. Build your trader rating with each successful sale. Our system has tracked over 100,000 sales and counting!
FAQ & TOS Register Search Today's Posts Mark Forums Read

Go Back   NamePros.com > Website Development Discussion Forums > Programming
Reload this Page php problem! Please help!

Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics.

Advanced Search


Closed Thread
 
LinkBack Thread Tools
Old 03-12-2005, 06:05 AM THREAD STARTER               #1 (permalink)
We Buy We Sell
Join Date: Feb 2005
Location: payperclick.biz
Posts: 972
domain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the rough
 



php problem! Please help!


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.
__________________
Pay Per Click Forum - Hot night clubs - Holiday Forum - British Petroleum - BGR Bloomer - Poker Forum - charity-gift.com - payperclick.biz - ahmadyar.co.uk - jmlcoupons.com - hotclubs.co.uk - totallymoney.info - bgrbloomer.com - edinburghinternetmarketing.com - efficientsearch.co.uk - HolidayForum.co.uk - BritishPetroleum.info - Adpreviewtool.com
domain4u is offline  
Old 03-12-2005, 06:10 AM   #2 (permalink)
Account Closed
 
.Matt's Avatar
Join Date: Oct 2004
Location: England
Posts: 926
.Matt is just really nice.Matt is just really nice.Matt is just really nice.Matt is just really nice
 



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..
.Matt is offline  
Old 03-12-2005, 06:18 AM THREAD STARTER               #3 (permalink)
We Buy We Sell
Join Date: Feb 2005
Location: payperclick.biz
Posts: 972
domain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the rough
 



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!!??!
__________________
Pay Per Click Forum - Hot night clubs - Holiday Forum - British Petroleum - BGR Bloomer - Poker Forum - charity-gift.com - payperclick.biz - ahmadyar.co.uk - jmlcoupons.com - hotclubs.co.uk - totallymoney.info - bgrbloomer.com - edinburghinternetmarketing.com - efficientsearch.co.uk - HolidayForum.co.uk - BritishPetroleum.info - Adpreviewtool.com
domain4u is offline  
Old 03-12-2005, 08:17 AM   #4 (permalink)
Senior Member
Join Date: May 2003
Posts: 2,187
adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough
 


Breast Cancer
Originally Posted by domain4u
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
????: NamePros.com http://www.namepros.com/programming/74783-php-problem-please-help.html

think about the rand function, then incorporate into your code.
adam_uk is offline  
Old 03-12-2005, 08:19 AM   #5 (permalink)
Account Closed
 
.Matt's Avatar
Join Date: Oct 2004
Location: England
Posts: 926
.Matt is just really nice.Matt is just really nice.Matt is just really nice.Matt is just really nice
 



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..
.Matt is offline  
Old 03-12-2005, 08:40 AM THREAD STARTER               #6 (permalink)
We Buy We Sell
Join Date: Feb 2005
Location: payperclick.biz
Posts: 972
domain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the roughdomain4u is a jewel in the rough
 



Working thanks.
__________________
Pay Per Click Forum - Hot night clubs - Holiday Forum - British Petroleum - BGR Bloomer - Poker Forum - charity-gift.com - payperclick.biz - ahmadyar.co.uk - jmlcoupons.com - hotclubs.co.uk - totallymoney.info - bgrbloomer.com - edinburghinternetmarketing.com - efficientsearch.co.uk - HolidayForum.co.uk - BritishPetroleum.info - Adpreviewtool.com
domain4u is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Tutorial: Getting started with PHP (The Basics) deadserious Webmaster Tutorials 60 11-17-2007 12:35 PM
Googlism - What does google think of you? deadserious The Break Room 55 12-15-2005 10:09 AM
PHP Problem on a website? aal814 Web Design Discussion 1 12-29-2004 11:53 AM
~~NEWS~~ HUGE PHP Security Problem - How To Upgrade PHP / cPanel / Zend ToddW For Sale / Advertising Board 0 12-22-2004 12:04 AM

Liquid Web Smart Servers  
All times are GMT -7. The time now is 12:11 AM.

Managed Web Hosting by Liquid Web
Domain name forum recommended by Domaining.com Powered by: vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.6.0 Ad Management plugin by RedTyger