[advanced search]
 

Go Back   NamePros.com > Discussion > Web Design & Development > Programming

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


Closed Thread
 
LinkBack Thread Tools
Old 03-12-2005, 05:05 AM   #1 (permalink)
We Buy We Sell
 
Join Date: Feb 2005
Location: ppcforum.org
Posts: 962
245.25 NP$ (Donate)

domain4u 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
Bpersian.com | mobimasters.net | Premium Keywords | magnitudes.co.uk | Keyboard Forum | US military Forum | edinburghkilts.net | vpsforum.net | poolforums.net | tldforum.net | careermate.co.uk | edinburghads.com
domain4u is offline  
Old 03-12-2005, 05:10 AM   #2 (permalink)
Account Closed
 
.Matt's Avatar
 
Join Date: Oct 2004
Location: England
Posts: 937
4.36 NP$ (Donate)

.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, 05:18 AM   #3 (permalink)
We Buy We Sell
 
Join Date: Feb 2005
Location: ppcforum.org
Posts: 962
245.25 NP$ (Donate)

domain4u 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
Bpersian.com | mobimasters.net | Premium Keywords | magnitudes.co.uk | Keyboard Forum | US military Forum | edinburghkilts.net | vpsforum.net | poolforums.net | tldforum.net | careermate.co.uk | edinburghads.com
domain4u is offline  
Old 03-12-2005, 07:17 AM   #4 (permalink)
Senior Member
 
Join Date: May 2003
Posts: 2,211
6,170.25 NP$ (Donate)

adam_uk is a jewel in the roughadam_uk is a jewel in the roughadam_uk is a jewel in the rough

Breast Cancer
Quote:
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

think about the rand function, then incorporate into your code.
adam_uk is offline  
Old 03-12-2005, 07:19 AM   #5 (permalink)
Account Closed
 
.Matt's Avatar
 
Join Date: Oct 2004
Location: England
Posts: 937
4.36 NP$ (Donate)

.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, 07:40 AM   #6 (permalink)
We Buy We Sell
 
Join Date: Feb 2005
Location: ppcforum.org
Posts: 962
245.25 NP$ (Donate)

domain4u 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
Bpersian.com | mobimasters.net | Premium Keywords | magnitudes.co.uk | Keyboard Forum | US military Forum | edinburghkilts.net | vpsforum.net | poolforums.net | tldforum.net | careermate.co.uk | edinburghads.com
domain4u is offline  
Closed Thread


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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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

Site Sponsors
Advertise your business at NamePros

All times are GMT -7. The time now is 02:44 PM.


Powered by: vBulletin® Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0
Template-Modifications by TMS
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85