note 71652 deleted from ref.session by betz

From: Date: Sun, 17 Dec 2006 19:56:33 +0000
Subject: note 71652 deleted from ref.session by betz
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-120710@lists.php.net to get a copy of this message
Note Submitter: robin at amiance dot com ---- To: aserboni: Make sure you don't use the same variables in scripts as you use in sessions. An easy way to avoid duplication is to label all variable $session_something. Session variables don't even have to be read back. By default they are always there once assigned (as long as the session lasts). It's very useful - the same way that all your $_POST and $_GET variables are always there for you - and you can either POST or GET them into your scripts - you don't actually have to fetch them with $email=$_POST['email'] - you just refer to your variable $email. The same with sessions. Once you've set (for example) a session_password and session_username session variable - you can keep reading them just as $session_username & $session_password.

« previous php.notes (#120710) next »