That worked! HOWEVER, my query is not doing what I hoped it would do.
You have been so helpful and I don't want to impose on you anymore than I have but if you are willing I have two more questions.
- How should my query be written to do the following. I have a form that posts to the page with the query...the form has five fields
Phylum
Clase
Orden
Familia
Genero
What I want is that if the user only fills in the phylum field, only the phylum result will be shown. If the user fills in the phylum and class field, again, only those two results are shown. However if the user fills in let's say the genero field than that field and all the fields above it are shown. In other words, I need the query to display the chosen field and all those above it even if the fields above the chose field have not been filled in. Am I explaining that clearly?
And the second question is
2. could you show me one example of what you mean by "escaping $_GET['phylum'] first, e.g. by using addslashes() if magic_quotes_gpc != 1"
Don't feel obliged to do any of these but please know you have been extremely helpful
regards
Jim