用户查看另一个用户个人资料页

i know there is a milion question with the same idea on this site but every question for a specific situation . My question is :

i really read a lot about how to do this but its not enough and not for novic .

i need a strategy or general answer how to start i know this :

  1. when click on url of usr like (mysite/userid=1000)
  2. i get the id in my php code and view the informations that belong to this id from my db .

this is okay .

the problem with session and current user id i dont get this part