Re: newbie: using sessions
| From: | Faisal Abdullah | Date: | Tue, 12 Mar 2002 09:39:04 +0000 |
| Subject: | Re: newbie: using sessions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-88165@lists.php.net to get a copy of this message | ||
Have you started session? And you have to register session variables as well.
Try this:
session_start();
$session_login = $HTTP_POST_VARS['login'];
session_register("session_login");
At the other page, where you want to output the variable, you must also start
session.
session_start();
echo $session_login;
Regards,
Faisal
On Tuesday 12 March 2002 17:28, you wrote:
> Hi i can't get the session variables working.
>
> When I get something like
> $_SESSION['Login']=$HTTP_POST_VARS['login'];
> on the first page, and i go with a link to an other php page.
> When then try to get $_SESSION['Login'] again it is empty.
>
> How comes?
>
>
> Maarten Weyn