Jump to content

hidden value


sandy1028

Recommended Posts

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>";
}



 

 

 

Link to comment
https://forums.phpfreaks.com/topic/64626-hidden-value/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.