How do i receive the data from url

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

How do i receive the data from url

Post by Shendemiar »

If if have a link like this

<a href="main.php?action=hall_of_fame">Hall of Fame</a>

Then how do get the action=hall_of_fame into my php variable?
Nay
Forum Regular
Posts: 951
Joined: Fri Jun 20, 2003 11:03 am
Location: Brisbane, Australia

Post by Nay »

In your main.php, do this:

Code: Select all

echo $_GET['action'];
:)

-Nay
Shendemiar
Forum Contributor
Posts: 404
Joined: Thu Jan 08, 2004 8:28 am

Post by Shendemiar »

Thanks...
Post Reply