Some people like that book, and some people don't. I personally don't think it's thorough enough... Besides that, the PHP and MySQL manual cover it all pretty well for you... Now to give you an idea of what you are looking for...
Let's say you have a table called "yourtable" with 3 fields: id, firstname and lastname, and there are 3 records:
1 John Doe
2 Jane Doe
3 Mike Jerky
Now, let's say you want to click on a name to pull that specific record.
<?
// Build your connection to your database. (Change the items in [b]bold[/b] to match your own settings)
$connect = mysql_pconnect("[b]yourhost[/b]", "[b]username[/b]", "[b]password[/b]") or die("Could not connect: ".mysql_error());
mysql_select_db("[b]database[/b]", $connect) or die('Can\'t use the database: '.mysql_error());
// Build your query (Change the item in [b]bold[/b] to match your own settings)
$qry = mysql_query("SELECT * FROM [b]yourtable[/b] ORDER BY lastname ASC, firstname ASC");
// Loop through a WHILE loop to display results
WHILE($gotqry = mysql_fetch_array($qry)){
echo "<a href=\"./details.php?id=".$gotqry['id]."\">".$gotqry['firstname']." ".$gotqry['lastname']."</a><BR />";
}
?>
This will output:
Jane Doe
John Doe
Mike Jerky
OK, now you click on Jane Doe's name, the URL would be like below, and you use the id variable in the URL to fetch Janes' specific record.
http://www.yourdomain.com/details.php?id=2
Your code to display Jane's record info might look something like:
<?
// Build your connection to your database. (Change the items in [b]bold[/b] to match your own settings)
$connect = mysql_pconnect("[b]yourhost[/b]", "[b]username[/b]", "[b]password[/b]") or die("Could not connect: ".mysql_error());
mysql_select_db("[b]database[/b]", $connect) or die('Can\'t use the database: '.mysql_error());
// Build your query (Change the item in [b]bold[/b] to match your own settings)
$qry = mysql_query("SELECT * FROM [b]yourtable[/b] WHERE id = '".$_GET['id']."'");
// Loop through a WHILE loop to display results
WHILE($gotqry = mysql_fetch_array($qry)){
echo $gotqry['lastname'].", ".$gotqry['firstname'];
}
?>
Nothing fancy, it just outputs the following:
Doe, Jane
When you say you wonder if it is the answer to your problems, what problems do you mean? Everything you describe is basic stuff covered in many different books (including the Teach Yourself in 30 days) and in the MySQL manual and PHP manual, both easily available online. If you don't open books and manuals, then your "problems" will never be solved.