Firstly I'd like to apologize for the topic question... I simply couldn't think of a question. Mainly because I don't know what I am looking for. I just need a hint or a pointer to the general direction of how to solve my problem. I think this is where my inexperience with the web shows a little... Anyway!
So what I have right now is a drop down with users in it. Select the user, and info comes up in 4 columns. That info needs to be sortable from the column headers. I can do both things independently from each other (the selection and the sorting), but I think the post/submit of the dropdown happens before I can save the variables to be passed in the URL, so I can't get it to behave properly.
So here's the code:
<form action="" method="post">
<input type="hidden" name="user_id" value="<?php echo $user_id; ?>">
User: <select name="user_id">
<?php foreach($users as $user): ?>
<option value="<?php echo $user['id']; ?>" <?php echo ($user_id == $user['id'] ? 'selected' : ''); ?>><?php echo $user['name']; ?></option>
<?php endforeach ?>
</select>
<input type="submit" name="submit" value="Select">
</form>
<table id="one-column-emphasis" summary="All Accounts">
<thead>
<tr>
<th style="width:20%"><a href="index.php?module=task_queue_list_per_user&action=view_list&sort=name">Name</a></th>
<th style="width:10%"><a href="index.php?module=task_queue_list_per_user&action=view_list&sort=priority">Priority</a></th>
<th style="width:10%"><a href="index.php?module=task_queue_list_per_user&action=view_list&sort=created_date">Date Created</a></th>
<th style="width:10%"><a href="index.php?module=task_queue_list_per_user&action=view_list&sort=created_date">Age</a></th>
</tr>
</thead>
What I think is happening is that the submit happens before the variables can be set to send to the database file. If I have a user selected and click on the column header to sort it, it takes me back to the default where there is no user selected.
Any ideas, tips or help? Thanks