echo $is_asc . $last_sort_by . $asc . $sql;
after one click on 'Name' yields:
1 ASCSELECT * FROM memberlist ORDER BY name ASC
after a second click it reads:
1name ASCSELECT * FROM memberlist ORDER BY name ASC
So $is_asc is not being parsed somehow...? Should I possibly remove the quotes from the 0 - 1 values, to make it a numerical toggle? grasping at straws
edit
No matter what I do, $is_asc is !always! set to 1... so obviously there's something wrong with my logic but I don't see it. :/