GIDForums  

Go Back   GIDForums > Computer Programming Forums > MySQL / PHP Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 20-Mar-2005, 22:10
nophoto nophoto is offline
New Member
 
Join Date: Mar 2005
Posts: 3
nophoto is on a distinguished road

secound level php switch &id=


hi all i'm needing some help with php switch case code needing to make a secound level string '&id=' how would i go around building this I have searched the internet and found nothing.. pls help me ;( thanks nophoto.
  #2  
Old 24-Mar-2005, 20:06
jmumm jmumm is offline
New Member
 
Join Date: Mar 2005
Location: Milwaukee, WI
Posts: 4
jmumm is on a distinguished road
From what I understand is you want to have a main switch to call the functions of what you want to run and then have a secondary switch to run a sub function out of the main.

If this is what you want to do, this is how I did it...

PHP Code:

switch ($s)
{
  case "forums";
  forums();
  break;

  case "home";
  home();
  break;
} 



Then inside the forums() function...

PHP Code:

switch ($id)
  case "view";
  view();
  break;

  case "post";
  post();
  break; 



And so on for each function. Does this answer your question?
Last edited by LuciWiz : 24-Mar-2005 at 23:37. Reason: Please insert your PHP code between [php] & [/php] tags
  #3  
Old 28-Mar-2005, 20:46
nophoto nophoto is offline
New Member
 
Join Date: Mar 2005
Posts: 3
nophoto is on a distinguished road
hey jmumm

yes it sort of does but i was thinking more on the lines off a string like this

www.mysite.com how could i make one of those, do you have any idea?

thx nophoto.
  #4  
Old 28-Mar-2005, 21:12
nophoto nophoto is offline
New Member
 
Join Date: Mar 2005
Posts: 3
nophoto is on a distinguished road
np i get what u were saying got it working thanks was right in front of my face all the time
  #5  
Old 31-Mar-2005, 14:29
tycooner tycooner is offline
New Member
 
Join Date: Mar 2005
Location: Canada
Posts: 19
tycooner is on a distinguished road
Use $_GET['id'] to read the URL variables.
 
 

Recent GIDBlogNARMY by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Help ! I need help starting up on Php ! onauc MySQL / PHP Forum 11 04-Jan-2005 23:57
Re: Command Line Arguments, Part 1 WaltP C Programming Language 0 10-Jul-2004 23:34
uisng php to display php dopee MySQL / PHP Forum 6 14-May-2004 18:40
php software dopee MySQL / PHP Forum 0 04-May-2004 11:26
All the big PHP script collections that matter jrobbio MySQL / PHP Forum 5 06-Jun-2003 16:14

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 16:49.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.