get method

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
clarky08
Forum Newbie
Posts: 4
Joined: Wed Apr 02, 2008 7:45 am

get method

Post by clarky08 »

Hi I am just starting with PHP and I was wondering if someone would be kind enough to help me. I want to use the get method to send a variable to the next page. I am making a website for football clubs and i have a database witht the following fields:

ClubID
ClubName
ClubManger

On the first page there is a list of clubs names. When you click on the clubs name I want it to bring you to the profile page of that club. So what i want is for when someone clicks on Arsenal, for example, their id number is sent onto the profile.php page and I can get the ClubName and ClubManager fields out of the database using the ClubID.

Thanks in advance,
Colm
User avatar
aceconcepts
DevNet Resident
Posts: 1424
Joined: Mon Feb 06, 2006 11:26 am
Location: London

Re: get method

Post by aceconcepts »

In the link that takes the user to the next page write the link as:

Code: Select all

 
echo='<a href="next_page.php?id=$club_id">Next</a>';
 
$club_id would obviously contain a valid club id value.
User avatar
mchaggis
Forum Contributor
Posts: 150
Joined: Mon Mar 24, 2003 10:31 am
Location: UK

Re: get method

Post by mchaggis »

Code: Select all

 
<a href="profile.php?ClubID=<?=$ClubID?>">Arsenal</a>
 
Post Reply