Associate
- Joined
- 19 Mar 2005
- Posts
- 569
Just wondering if someone could point me in the right direction, I want to have a page which contains links to all of the people that are in my database. Then when you click on their name a new page opens with all of their information.
This is what I have so far, I want to know if this is correct for what I am doing and what needs to be on playerDetails.php for me to be able to able to show the details of the name just clicked.
Cheers
Leon
PHP:
$query = "SELECT playerID, playerName FROM players ORDER BY playerName";
$result = mysql_query($query) or die('Error : ' . mysql_error());
$content = '<ul>';
while ($row = mysql_fetch_assoc($result))
{
print "<li><a href=\"playerDetails.php?playerID={$row['playerID']}\">{$row['playerName']}</a></li>\r\n";
}
$content .= '</ul>';
This is what I have so far, I want to know if this is correct for what I am doing and what needs to be on playerDetails.php for me to be able to able to show the details of the name just clicked.
Cheers
Leon