sandy1028 Posted August 13, 2007 Share Posted August 13, 2007 Hi, I have to sort the table independent of the columns... I have to pass the hidden value of the column to other column so that the sort order of one column doesnot change when clicked on the other column header. How can i pass the hidden value. When I click on the particular column the sort should change. How to pass the hidden value of $name along with the address. Now when i click on the Address when Name column is in decesding the sort order changes to ascending which should not happen until the Name header is clciked if($name != "asc") { echo "<ul><li class=\"connection\" id=\"name1\"><a href=\"tree.php?name=asc#name1\">Name</a>"; } else if($name == "asc"){ echo "<ul><li class=\"connection id=\"name1\"><a href=\"tree.php?name=desc#name1\">Name</a>"; } echo "<ul>"; if($name == "asc") { foreach($lines as $line) { //Some code of sorting } } if($name != "asc") { foreach($lines as $line) { $text_line=explode(":",$line); //some code of sorting decending if($address != "asc") { echo "<li class=\"connection\" id=\"address1\"><a href=\"tree.php?address=asc#address1\">Address</a>"; } if($address == "asc"){ echo "<li class=\"connection\" id=\"address1\"><a href=\"tree.php?address=desc#address1\">Address</a>"; } Quote Link to comment https://forums.phpfreaks.com/topic/64626-hidden-value/ 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.