Here I need your help, I have developed a phone book management system and I want to search for contacts of the person using the username in the session. Here is the search code I have but it returns all values even those that do not belong to that person.
if (isset($_POST['sea'])) {
$value=$_POST['sear'];
$get=mysql_query("select * from contacts where iduser='".$_SESSION['username']."' || mno like '%$value%' || wno like '%$value%' || nname like '%$value%'");
while ($got=mysql_fetch_array($get)) {
echo "<tr><td><img src=".$got['image']." width='100px' height='50px'></td><td>".$got['fname']."</td><td>".$got['lname']."</td><td>".$got['nname']."</td><td>".$got['mno']."</td><td>".$got['email']."</td><td id='print'><a href=''>More</a> | <a href=''>Edit</a> | <a href=''>Delete</a></td></tr>";
}
}
Help me please, thank you.