Current location: Hot Scripts Forums » Programming Languages » PHP » .php?id=xxx


.php?id=xxx

Reply
  #1 (permalink)  
Old 04-22-05, 08:14 PM
skinner skinner is offline
New Member
 
Join Date: Apr 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
.php?id=xxx

Hi!

As the title suggests, I need to send a variable to another page when loding it.
page "A" looks a bit like this:
PHP Code:

blablabla

<?php
echo '<a href ="pageB.php?id='.$id.'">link</a>';
?>
The question is, how do i access "id" from the URL, when loading pageB.php?

Thanks!

edit: Nevermind, i found it

Last edited by skinner; 04-22-05 at 08:31 PM.
Reply With Quote
  #2 (permalink)  
Old 04-22-05, 10:39 PM
alabaster_lynch alabaster_lynch is offline
Wannabe Coder
 
Join Date: Mar 2005
Posts: 103
Thanks: 0
Thanked 0 Times in 0 Posts
you would call it like this

$variable = $_GET['id'];
Reply With Quote
  #3 (permalink)  
Old 04-23-05, 01:02 AM
Nitin Gupta Nitin Gupta is offline
Newbie Coder
 
Join Date: Oct 2004
Location: India
Posts: 75
Thanks: 0
Thanked 0 Times in 0 Posts
you can also use

$_REQUEST['id'] here.
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:40 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.