I have problems with the following link:
echo "<a href=\"".$_SERVER['PHP_SELF']."?action=display&id_in=$tempid&where=$where\">$kot</a> \n";
after clicking on it the value of $where effectively passed to the script is partial!! Something like "WHERE property.status='W' AND property.id= "
Why?