RE: [PHP] Session question
| From: | John Holmes | Date: | Sat, 25 May 2002 11:42:06 +0000 |
| Subject: | RE: [PHP] Session question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-99218@lists.php.net to get a copy of this message | ||
Just be sure you call session_start() on any page you want to access
session variables.
Then you can set a variable by doing
$_SESSION["myvariable"] = "hello";
and then you can use $_SESSION["myvariable"] anywhere you want.
This assumes the latest version of PHP. The procedure is similar on
older versions, you just have to use session_register().
---John Holmes...
> -----Original Message-----
> From: Christian Ista [mailto:christian.ista@teledisnet.be]
> Sent: Saturday, May 25, 2002 4:45 AM
> To: php-general@lists.php.net
> Subject: [PHP] Session question
>
> Hello,
>
> I'm a newbie in PHP, I use a lot ColdFusion (at work).
>
> With ColdFusion, it's very easy to create and use session variable. I
do
> something like that :
> <cfset session.myvariable = "hello"> and this variable can be use
> everywhere.
>
> Could you tell me how that's work in PHP. I saw in help file
> session.start.
> But it's not very clear for me.
>
> Thanks for your help,
>
> Bye
>
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php