php - user authentications via session or cookies? -
this moment if user enter's correct username , password creating session:
$_session['userid'] = $user_data[0]->id; $_session['username'] = $user_data[0]->username); $_session['loggedin'] = true;
after that, $_session['loggedin'] can check if user can view part of website or not.
is method 'good/safe' ?
- any benefit's using cookies based , session based authentication ?
- which method common site's using ?
- what guys using sites ?
have @ great answer joel coehoorn on page . of questions answered in post.
web authentication state - session vs cookie vs?
i hope help.
cheers
Comments
Post a Comment