PDA

View Full Version : Question about ID's


Logikos
08-17-2004, 04:15 AM
okay im in the middle of a hack that im making, and i got most of the core code finised. I'm still learning PHP so bare with me. Here is my problem.

in my code i have a home page using.


if (empty($_REQUEST['do']))
{
$_REQUEST['do'] = 'home';
}
if ($_REQUEST['do'] == 'home')
{
ECHO "BLAH BLAH";
}


I was wondering how can i get the next part to show the IDs in the url. For example. You have a category called. Forum Announcements and the forumid is '69' and when you click on it, it goes to the URL 'blah.php?f=69'. Well how do i get my code to read the IDs in the URL.


if ($_REQUEST['do'] == '$id')
{
ECHO "BLAH BLAH";
}


Obvously that will not work, but theres an example of what im trying to do. Any ideas? or quick fixes? TIA

EDIT: Nevermind $id=$_GET['id']; is my answer

Modin
08-17-2004, 10:13 PM
$id=$_REQUEST['id'] should also work.