note 53545 added to ref.session

From: Date: Sun, 05 Jun 2005 18:29:12 +0000
Subject: note 53545 added to ref.session
Groups: php.notes 
Request: Send a blank email to php-notes+get-89967@lists.php.net to get a copy of this message
The notes above explain: "Also note that you must start your session using session_start() before use of $_SESSION becomes available." It would be worth adding that $_SESSION variables are not available until something has been sent to the browser on the page - or at least that was my experience. Forgive if it is obvious or if it is explained elsewhere in the manual but it caused me much grief. (I was trying to be tidy and get the processing done before displaying any HTML.) Hugh Kernohan ---- Manual Page -- http://www.php.net/manual/en/ref.session.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+53545 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53545&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53545&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53545&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53545&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53545&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+53545&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89967) next »