note 21311 added to ref.session
| From: | badassfrey at hotmail dot com | Date: | Tue, 07 May 2002 21:53:48 +0000 |
| Subject: | note 21311 added to ref.session | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-30305@lists.php.net to get a copy of this message | ||
BEGINNERS:
I want to correct one thing, and add another.
Firstly, if you change a variable after you register it (using
session_register('variable_name'), the effects WILL be passed to the next page. My
mistake, so sorry.
Second, my friend's code still didn't work so I looked at it. His problem was how he
registered his variable:
session_register($content[1]); // WRONG!!!
You shouldn't put the dollar sign, and the variable name should be put in quotes, like this:
session_register('content'); // RIGHT!!!
He really wanted to pass only the second part of the array content, but since I really don't
know how, I would recommend sending the whole thing.
Good luck! -BadAssFrey
--
http://www.php.net/manual/en/ref.session.php
http://master.php.net/manage/user-notes.php?action=edit+21311
http://master.php.net/manage/user-notes.php?action=delete+21311
http://master.php.net/manage/user-notes.php?action=reject+21311