I am pretty new to PHP Development. So far I stored in a cookie a hash ( user + password ) to keep the user logged in.Now I have discovered php sessions.
Is it possible for someone to modify the value stored as this without having access to server of course?
$_SESSION['username'] = 'test@test.com';
No, session can not be modified directly without server access (Until you left loopholes for hacking)
Session is an array on server (RAM or FileSystem) which is mapped to the user through cookies. User only get session id in cookies. When user return, PHP gets that session id and restore session.