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. 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"; ?> 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"> 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... 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. 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! Link to comment https://forums.phpfreaks.com/topic/249358-need-help-please/#findComment-1281952 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.