I have a database that requires that some of the entries have hyperlinks that go to a page which presents some more specific information about the data itself.
Basically, the 'main' database that I have is a large list of plants, their scientific name, origin, bloom date, etc, etc. Now I need to be able to click on any given plant, and have a page open where some more specific data is presented (like higher res pics, etc).
I thought I could do it by making a sample link something like "plantpage.php?id=15" where the ID is the number that MySQL gave the entry.
But for the life of me, I cannot get Mysql to even display all the data about one entry on this plantpage.php. It is like all or nothing....I can't figure out how to tell MySQL that I only want this one record, not all of them.
I am assuming the answer lies in the following line:
$sql = mysql_query("SELECT * FROM herbplants" ,$db);
I tried putting the ID number instead of the asterisk to no avail, and am stumped.
If anyone could show me how to call up the right info and display it, you would be my hero!!!
Thanks a lot in advance....btw, this board rocks...has helped me out tons.