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 > CODE
Reload this Page PHP Switch/Case

CODE This forum is for posting code snippets and example scripts that aren't quite tutorials, but could be useful for others. You may post code snippets and/or completed scripts that you've written and want to share here.

Advanced Search
7 members in live chat ~  


Closed Thread
 
LinkBack Thread Tools
Old 09-03-2006, 08:14 AM THREAD STARTER               #1 (permalink)
NamePros Regular
 
Ryder's Avatar
Join Date: Mar 2006
Posts: 227
Ryder is a jewel in the roughRyder is a jewel in the roughRyder is a jewel in the rough
 



PHP Switch/Case


netsuhi com/forum/viewtopic.php?t=16

More tutorials at:
netsuhi com
__________________
| HexRde.com | NetSuhi.com |
Last edited by SecondVersion; 09-03-2006 at 06:05 PM.
Ryder is offline  
Old 09-03-2006, 05:04 PM   #2 (permalink)
NamePros Regular
 
Noobie's Avatar
Join Date: Feb 2006
Location: Montreal, Quebec, Canada
Posts: 324
Noobie is on a distinguished road
 



Quote:
Ever wonder how people get things like ?x=news&id=496? Well, here is one way to do it.
This is your code
????: NamePros.com http://www.namepros.com/code/234407-php-switch-case.html
<?php
switch(id){
case 'news':
//what you want for news in here.
break;
case 'about':
//what you want on the about page.
break;
default:
//what text you want to display for default.
break;
}
?>
I'm gonna bet it hits default everytime.
__________________
Goldkey.com is a scam
What's your BMI? | Timestamp Generator
Noobie is offline  
Old 09-03-2006, 06:03 PM   #3 (permalink)
Tech Support
Join Date: Mar 2005
Posts: 4,944
Eric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatnessEric Has achieved greatness
 

Member of the Month
MOTM September 2005
Save a Life Child Abuse 9/11/01 :: Never Forget Baby Health Marrow Donor Program AIDS/HIV Breast Cancer Animal Rescue Cystic Fibrosis Ethan Allen Fund Animal Cruelty Ethan Allen Fund Ethan Allen Fund Baby Health Cancer Alzheimer's Protect Our Planet Cancer Survivorship SIDS Child Abuse Diabetes Protect Our Planet Multiple Sclerosis Autism Adoption Special Olympics
If your going to post in here, post the code. This is, and can be seen as, advertising. I will lock each thread on site.
Eric is offline  
Closed Thread


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


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

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