note 71652 added to ref.session

From: Date: Sun, 10 Dec 2006 09:03:43 +0000
Subject: note 71652 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-120469@lists.php.net to get a copy of this message
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. ---- Server IP: 216.194.113.175 Probable Submitter: 166.217.88.62 ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- https://master.php.net/note/edit/71652 Del: integrated -- https://master.php.net/note/delete/71652/integrated Del: useless -- https://master.php.net/note/delete/71652/useless Del: bad code -- https://master.php.net/note/delete/71652/bad+code Del: spam -- https://master.php.net/note/delete/71652/spam Del: non-english -- https://master.php.net/note/delete/71652/non-english Del: in docs -- https://master.php.net/note/delete/71652/in+docs Del: other reasons-- https://master.php.net/note/delete/71652 Reject -- https://master.php.net/note/reject/71652 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#120469) next »