title: Logged in user accessing other users profiles
body: <p>I am trying to build a small social network that will have a very simple functionality. No friend requests, no picture albums, no likes. All users have access to each others profiles but only the logged in user can modify the info on his/her page. </p>
  
  <p>So far I managed to create the registration logic as well as the login check logic. By creating a session for user_id, I can retrieve user's info and populate the different areas of his/her profile page. </p>
  
  <p>My problem has to do with the logic that needs to be applied in order for the logged in user to be able to view other user's profile page. I 've created a suggest search box that successfully shows a drop down list of other users results according to the data the logged in user has put into. Each result redirects to the profile.php layout and waits to be populated. I am guessing I have to apply more sessions but I reached to the point where I cannot see things clear and it would be useful if I could have your opinion on this matter.</p>
  
  <p>Please bear in mind that I am only doing this project in order to improve my skills and secondly I only need the logic and this is the reason I have not posted any code. Thank you in advance!</p>