RE: [PHP] Is there a way to set session variables

From: Date: Mon, 05 Nov 2001 14:40:44 +0000
Subject: RE: [PHP] Is there a way to set session variables
Groups: php.general 
Request: Send a blank email to php-general+get-73488@lists.php.net to get a copy of this message
<? session_start(); // register some $MySession->MyVar = $watyouwant; $MySession->MyVar2 = $watyouwant2; // MAKE SESSION session_register("MySession"); ?> To use the vars: <? session_start(); print $MySession->MyVar; print $MySession->MyVar2; ?> ________________________________________ Sjoerd van Oosten Digitaal vormgever svoosten@esites.nl Datamex E-sites B.V. http://www.esites.nl Minervum 7368 Telefoon: (076) 5 730 730 4817 ZH BREDA Telefax: (076) 5 877 757 _______________________________________ -----Oorspronkelijk bericht----- Van: Anthony [mailto:atampone@attechcomputer.com] Verzonden: maandag 5 november 2001 15:33 Aan: php-general@lists.php.net Onderwerp: [PHP] Is there a way to set session variables I want to be able to set a variable that would be available throughout the browser session. I need every page the user views to have this variable. I thought I could use a cookie, but I wanted to know if there was an other way. Thanks. - Anthony -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#73488) next »