jthan03 Posted October 19, 2011 Share Posted October 19, 2011 Hi, Can you please help me on this. I want to remove the ASC/DESC in the URL by using 1/0 as a value. Here is the code: <?php if(empty($_GET['order'])){ $_GET['order'] = "ASC"; }else{ if($_GET['order'] == 'DESC'){ $_GET['order'] = "ASC"; }else{ $_GET['order'] = "DESC"; } } ?> <script> function FuncSort(aID) { document.form10.dsp.value = ""; document.form10.action = "../qa/"+aID; document.form10.submit(); } </script> <html> <td style="width:120px;"><a href="#" onclick="javascript:FuncSort('tsa010.php?order=<?=$_GET['order']?>'); return false">Date/Time</a></td> </html> thank you so much for the reply. Quote Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/ Share on other sites More sharing options...
sunfighter Posted October 19, 2011 Share Posted October 19, 2011 <?php if ($_GET['order'] == 1) $way = "ASC"; if ($_GET['order'] == 0) $way = "DESC"; ?> Quote Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/#findComment-1280640 Share on other sites More sharing options...
sunfighter Posted October 19, 2011 Share Posted October 19, 2011 forgot this line: <a href="#" onclick="javascript:FuncSort('tsa010.php?order=<?php echo $way; ?>'); return false"> Quote Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/#findComment-1280643 Share on other sites More sharing options...
jthan03 Posted October 21, 2011 Author Share Posted October 21, 2011 forgot this line: <a href="#" onclick="javascript:FuncSort('tsa010.php?order=<?php echo $way; ?>'); return false"> if i remove this, what will i put to create a ASC/DESC link? thanks for the reply... Quote Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/#findComment-1281016 Share on other sites More sharing options...
sunfighter Posted October 21, 2011 Share Posted October 21, 2011 forgot this line: <a href="#" onclick="javascript:FuncSort('tsa010.php?order=<?php echo $way; ?>'); return false"> if i remove this, what will i put to create a ASC/DESC link? thanks for the reply... I didn't say remove that line. I changed it some how, don't remember how, check it out with your line and replace. Quote Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/#findComment-1281143 Share on other sites More sharing options...
jthan03 Posted October 25, 2011 Author Share Posted October 25, 2011 thank you so much! i will be reviewing it, but if you remember how to do it, please advise me... thanks again! Quote Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/#findComment-1281952 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.