I've tried what you suggested but I'm still not getting it. The pulldown menu allows the site visitor to select how they want the data sorted, by location, time or day of the week.
The select variable is called $schedule. So the form looks like this:
Show classes by:
<select name="schedule">
<option value="">Please Select One</option>
<option value="location">Location</option>
<option value="day">Day</option>
<option value="time">Time</option>
</select>
And the query looks like this:
$query = "SELECT * FROM classes ORDER BY '$schedule'";
For all other instances, the data displays correctly. But when you select to sort the data by the day column, it sorts alpha.
Would the if/sortstr statement work in this case? If so, where would I need to put this in the code to make it work with the query statement?
Any other help you can give would be greatly appreciated. I am learning a lot, but this is beyond my scope to date.
Thanks!