search partner timeline code

<!----user timeline starts---->

<div id="user_timeline">
<div id="user_details">
<?php
$user = $_SESSION['email'];
$get_user = "select * from users where user_email= '$user'";
$run_user = mysqli_query($con,$get_user);
$row=mysqli_fetch_array($run_user);

$user_id = $row['user_id'];
$user_name = $row['user_name'];
$user_country = $row['user_country'];
$user_image = $row['user_image'];
$register_date = $row['user_reg_date'];
$last_login = $row['last_login'];
$user_posts = "select * from posts where user_id='$user_id'";
$run_posts = mysqli_query($con,$user_posts);
$posts = mysqli_num_rows($run_posts);

//getting the number of unread messages
$sel_msg = "select * from messages where receiver='$user_id' AND status='unread' ORDER by 1 DESC";
$run_msg= mysqli_query($con,$sel_msg);
$count_msg = mysqli_num_rows($run_msg);

echo "<center><img src='user/user_images/$user_image' width='200' height='200'/></center>";
<div id='user_mention'>
<p><strong>Name:</strong>$user_name</p>
<p><strong>Country:</strong>$user_country</p>
<p><strong>Last Login:</strong>$last_login</p>
<p><strong>Member Since:</strong>$register_date</p>

<p><a href='my_messages.php?inbox&u_id=$user_id'>Messages($count_msg)</a></p>
<p><a href='my_posts.php?u_id=$user_id'>My Posts ($posts)</a></p>
<p><a href='edit_profile.php?u_id=$user_id'>Edit My Account</a></p>
<p><a href='logout.php'>Logout</a></p></div>";?></div></div></div>
<!---------User timeline ends here----->
<!---------Content timeline ends here----->
Table name: messages
msg_id (INT)       values 11 autoincrement primarykey
sender  (VARCHAR)  values 255
receiver (VARCHAR)
msg_sub   (TEXT)
msg_topic  (TEXT)
reply      (TEXT)
status     (TEXT)
msg_date   (TIMESTAMP)

.content{
width:1000px;
margin:0 auto;
}

#user_timeline{
background:#AFEEEE;
width:250px;
float:left;
height:600px;
border-right:1px solid black;
}
#user_details{
padding:10px;
}
#user_details img{
border:2px solid black;
border-radius:20px;
}
#user_details p{
margin-bottom:10px;
padding:5px;
}
#user_details a{
color:brown;
font-size:20px;
text-decoration:none;
}

#user_details a:hover{
color:black;
font-size:20px;
text-decoration:underline;
font-weight:bolder;
}
#user_mention{
background:#E6E6FA;
border:2px solid black;
border-radius:20px;
width:200px;
margin:0 auto;
padding:5px;
}
#content_timeline{
float:right;
width:700px;
padding:10px;
}
.ff input {margin-bottom:5px;}
.ff select {margin-bottom:5px;}

#f input{
   padding:7px;
   border:1px solid black;
   border-radius:5px;
   font-weight:border;
}
#f textarea{

}