Anyone can show an example as how you use sessions to store information across pages? For instance for the following scenario:

1) Loginform is shown (login.php)
2) User punches in wrong credentials (login.php)
3) Errormsg is shown with the form (login.php)
4) User tries again - this time with the right credentials (login.php)
5) Dashboard is shown with a msg saying that login was successful (dashboard.php)

I guess you would wrap it in an object:

PHP Code:
// without proper error handling
class Log_Session {
__construct() {}
log($type$msg) {
$_SESSION[$type] = $msg;
getLog($type) {

Would that be how you would do it?