I have a website that displays pages based on scientific names stored in a database table. For example, if the database includes the value ‘bison’, then it will display a page at MySite/bison.
The problem is that there are a few scientific names that are duplicates. For example, Phyllanthus is the name of both a genus of birds and a genus of plants. So if I navigate to MySite/phyllanthus, it displays the bird information by default.
I would like to include a little box near the top of the page that asks “Were you looking for information on the PLANT genus?” People could then click on a link, and the page would display information on the plant - without changing the URL.
I think the key to accomplishing this is the database’s parent-child relationship. Let’s say the bird Phyllanthus’ parent is ‘Uno’ and the plant Phyllanthus’ parent is ‘Dos.’ I have a script that traces parents and grandparents to the top of the food chain, ultimately recognizing a scientific name as a bird, mammal, plant, etc.
So here’s my question: Is there a way to enable visitors to change a database value? Specifically, how can they click a button or link that changes the parent from ‘Uno’ to ‘Dos’, changing the page content from information about a bird to information about a plant?
Thanks.