I am a beginning PHP/MySQL programmer, and I would like some optimization advice.
I have a company phone directory that I've written in PHP/MySQL. It works great, but is a little clumsy. Users can search on the first letter of the last name, by first/last name combo, or by department. I use 3 separate forms on my header page (which is included in the results page). I have 3 separate results pages, each of which performs the db lookup based on what button called it (i.e. the alpha results page searches the db on the letter that was clicked).
My question is this...I'd like to just have 1 results page (so updates can be easy). I would like to have 3 db search pages (or scripts) do the searching, and then pass the results set to the results page. I've tried doing a global variable set to the mysql_query results, but keep getting UNDEFINED VARIABLE. I think what I'm trying is possible, just not sure how to do it.
Thanks for any assistance! I've gotten some wonderful tips from this forum...you all are wonderful!
John