I'm a novice at this but I can understand SOME of it so go easy on me.
I have a page that displays record from a database. Some fields are...
Name
Church
Title
State
etc.
I want to put a drop down at the top of the page so the user can sort the records by any of those fields. I had another page set up that would accept a $_GET and show records by category. (A friend wrote the code, not me)
mysql_select_db($db_name);
$query="SELECT * FROM members WHERE category ='" . mysql_escape_string ($_GET[category]) . "' ORDER BY company";
$result=mysql_query($query) or die (mysql_error());
Instead of getting the records just by a field I want it to show all of the record but use the ORDER BY and sort them as stated above. Something like ORDER BY ($_GET[user chosen value]) I would guess. Is this possible?
Thanks,
BATMan