Ok. So, I've built some tables in MySQL, a list of mammals, amphibians and reptiles.
When people visit the Mammals page (mammals.php), I want there to be a list of Mammal common names (common_name), and if they click on that common_name, a new version of mammals.php is displayed that writes all the info we have for that specific mammal.
I know how to write the list of mammal common names. I know how to write all the info for that mammal to a static page.
However, I can't figure out how to make clicking the echo'd common_name a link to a new instance of mammal.php.
I really don't want to make 100+ pages, one for each mammal, amphibian and reptile. I want to create a function that can be used for all three.
while($row = mysql_fetch_array($result))
echo "<td>" . $row['common_name'] . "</td>";
Where do I put in the POST, the Variable, the link, the function?
There must be a simple way to use 'common_name' in the naming paradigm for the on-click variable, such as $Common_Name = $result, but one that creates a unique instance of that variable on-click, so that the function can use that info to compare it to the table values and WHERE they are equal, write a new instance of the page.
No, this is not for an assignment. This is for a professor's side project website. Yeay me