RE: [PHP-DB] session variable in other directories
| From: | kyle@fidgeting.net | Date: | Sun, 13 Apr 2003 17:52:54 +0000 |
| Subject: | RE: [PHP-DB] session variable in other directories | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-27056@lists.php.net to get a copy of this message | ||
I'm guessing that this has to do with the cookie that is set- it is being
set for the first directory, but the second cannot receive the cookie.
Try putting the SID in your URLs.
Original Message:
-----------------
From: norman@no-gi.de
Date: 13 Apr 2003 16:43:57 -0000
To: php-db@lists.php.net
Subject: [PHP-DB] session variable in other directories
Hello,
i have got a little problem. On my homepage is a login. If the username
und password is correct i register the $_Session variables
if (mysql_num_rows ($res) > 0)
{
$ligne = mysql_fetch_object ($res);
// session_register ("x1","x2","x3","x4","x5");
$_SESSION["x1"] = "true";
$_SESSION["x2"] = $ligne->name;
$_SESSION["x3"] = $ligne->mail;
$_SESSION["x4"] = $ligne->kategorie;
$_SESSION["x5"] = $ligne->rechte;
In all php files in the same directory i can access this variables, but if
i am in another directory i does not work. if have already read the
session_registor is old and should not be used.
I hope some can help me
thx
norman
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .