Thanks for the reply. That helped so much. The 'sort_by' drop down menu works great. For some reason the 'sort_order' isnt working. it is always sorting ascending. does anything jump out to anyone as to the reason it would do this?
here is my code. i had to edit it a little from the above because of the script i am using.
in browse.php
// vars url & form
global $cat,$pg_which,$sort_by,$sort_order;
query = "select * from idx_link where category_id = '$cat' order by '$sort_by' '$sort_order'";
in browse.html (template for browse.php)
<FORM action="browse.php?cat=<%cat%>" method="POST">
<SELECT name="sort_by" class="d-r">
<option value='title'>Name</option>
<option value='date'>Date</option>
<option value='rating'>Rating</option>
<option value='hits'>Hits</option>
</SELECT>
<SELECT name="sort_order" class="d-r">
<option value='asc'>Ascending</option>
<option value='desc'>Descending</option>
</SELECT>
<INPUT type="submit" value="Sort" class="button" align=top>
</form>
another small thing. when the data is sorted the dropdown menus always go back to Name and Ascending as default. I would like them to stay on what was selected. how can I do this?
thanks again,
scheetz