Friends, I need to receive all messages related to the person who has logged in from the "messages" table and the messages that the person has sent. I have made a few attempts and searched online, but I couldn't find the correct code. I would appreciate it if you could help. //code $message_query = mysql_query("SELECT * FROM `messages` WHERE sender_id='$_SESSION[user_id]' AND receiver_id='$_SESSION[user_id]'"); //code