Current location: Hot Scripts Forums » Programming Languages » PHP » index.php?name=Lafa&id=1


index.php?name=Lafa&id=1

Reply
  #1 (permalink)  
Old 07-12-05, 10:26 AM
Lafa's Avatar
Lafa Lafa is offline
Newbie Coder
 
Join Date: Jul 2005
Location: Moss, Norway
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
index.php?name=Lafa&id=1

Iv seen alot of sites whith dynamic url's, i know how i do the "index.php?id=bla" etc but how do i get the "index.php?id=bla&id2=ble"?
__________________
TUXRocks, you dont.

Push it to the limit
Reply With Quote
  #2 (permalink)  
Old 07-12-05, 11:47 AM
Acecool's Avatar
Acecool Acecool is offline
Aspiring Coder
 
Join Date: Nov 2003
Posts: 506
Thanks: 0
Thanked 0 Times in 0 Posts
Same was as you get id..

$_GET['id']
$_GET['id2']

?id=x&id2=x

? = first
& = second, third, fourth and so on..
__________________
Check Acecoolco.com for PHP Tutorials, and other tuts
If you plan on contacting me, please read this: Legal Terms & Conditions
Reply With Quote
  #3 (permalink)  
Old 07-12-05, 04:26 PM
FiRe FiRe is offline
Code Guru
 
Join Date: Oct 2004
Location: UK
Posts: 801
Thanks: 0
Thanked 0 Times in 0 Posts
if your using a switch...

PHP Code:

case "blah":

include(
"blah.php");
break; 
User goes to ?page=blah you get blah.php
If user goes to ?page=blah&id=1 then in blah.php you would use:

PHP Code:

$id $_GET['id']; 

thats it
__________________
Alexa Share <-- Trade virtual shares in websites with this online game.

codR.us <-- Submit and vote for your favorite code snippets with codR.us.

XEWeb.net <-- The ultimate PHP resource network.
Reply With Quote
Reply

Bookmarks


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

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump


All times are GMT -5. The time now is 06:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.