Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Passing Variables to New Page

Status
Not open for further replies.

streborr

IS-IT--Management
Jan 16, 2002
98
I'm trying to pass the "ID" to the new page, but I can't get it to work.

The first page has this:

<a href="Forum.php?id=<?php echo $ForumID ?><?php echo $ForumName ?></a>

On the second page - Forum.php - I've tried:
$id = $_Get['id] and
$id = $_Post['id] and
$id = $_Request['id]
But none of them work.

What am I doing wrong here?

(be gentle, I'm very new to PHP)

Thanks

&quot;Without deviation, progress is not possible.&quot;
Frank Zappa
 
Its $_GET, $_POST or $_REQUEST...note the caps

Bastien

Cat, the other other white meat
 
and i assume you forgot to close the ' before ] :p

btw, $_GET is for the vars passed in the url (i.e. index.php?foo=bar), $_POST is for form fields, as well as $_REQUEST... so in your case $_GET would have to work ;)

jamesp0tter,
mr.jamespotter@gmail.com

p.s.: sorry for my (sometimes) bad english :p
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top