if the user leaves the txtSearch field empty, the parameters $_SESSION['username'] is not being called and all the records are viewed.
On the other hand, if a search parameter is entered in the txtSearch field, the SQL query works perfectly showing only the records that the user is permitted to see.
What shall I do to make the SQL query run correctly by displaying only the permitted records if the txtSearch is left blank?
THanks