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
get method
Moderator: General Moderators
- aceconcepts
- DevNet Resident
- Posts: 1424
- Joined: Mon Feb 06, 2006 11:26 am
- Location: London
Re: get method
In the link that takes the user to the next page write the link as:
$club_id would obviously contain a valid club id value.
Code: Select all
echo='<a href="next_page.php?id=$club_id">Next</a>';
Re: get method
Code: Select all
<a href="profile.php?ClubID=<?=$ClubID?>">Arsenal</a>