What do I need to store in the php session when user logged in?
问题 Currently when user logged in, i created 2 sessions. $_SESSION['logged_in'] = 1; $_SESSION['username'] = $username; // user's name So that, those page which requires logged in, i just do this: if(isset($_SESSION['logged_id'])){ // Do whatever I want } Is there any security loopholes? I mean, is it easy to hack my session? How does people hack session? and how do I prevent it?? EDIT: Just found this: http://www.xrvel.com/post/353/programming/make-a-secure-session-login-script http://net