note 35341 added to function.session-register
| From: | at dot dot dot at at phoc dot de | Date: | Thu, 28 Aug 2003 09:11:30 +0000 |
| Subject: | note 35341 added to function.session-register | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-55205@lists.php.net to get a copy of this message | ||
Caution!
If you are running PHP in version 4.0.6 you have to use
session_register();
Example:
skript one
<?
...
session_name("Metallica"); //defines a session name
session_start(); //starts the session
$varX = "Shake your body!"; //defines a ordinary variable
session_register("varX"); //registers the variable as a global session variable
...
?>
skript two
<?
...
session_start(); //starts the session
echo "Simone says: " . $varX; //Output
...
?>
skript one refers to skript two, as example with a HTML-form or a HREF. Output of skript two should
be
"Simon says: Shake your body!"
$HTTP_SESSION_VARS and $_SESSION are not able to run under PHP4.0.6 at least with my system
configuration (AIX 4, Apache 1.3.22, PHP4.0.6). The settings in the configfiles could be the
solution in finding a other behavior.
Hope this could solve somone's problems.
Greetz
PhoC
----
Manual Page -- http://www.php.net/manual/en/function.session-register.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35341
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35341&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35341&report=yes