Session does not destroy itself
Moderator: General Moderators
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
Session does not destroy itself
Hi guys!
I have a web that contains a lot of php sites. On each site I included session_start(), so that every one of that sites can access session vars.
As far as I am informed, if a user accesses a site that has no session_start() at the beginning, the session is destroyed.
Not here. The user leaves the web and returns to it, but the contents of the session variables are still there.
How can I have the session destroyed on exit of the web?
Thanks,
Steff
I have a web that contains a lot of php sites. On each site I included session_start(), so that every one of that sites can access session vars.
As far as I am informed, if a user accesses a site that has no session_start() at the beginning, the session is destroyed.
Not here. The user leaves the web and returns to it, but the contents of the session variables are still there.
How can I have the session destroyed on exit of the web?
Thanks,
Steff
Usally sessions are destroyed when the brower closes, also theres session_destroy.
http://www.php.net/session_destroy
http://www.php.net/session_destroy
Also if you wanna see what i mean....
Go Here: http://bleedingday.com/bd3/ (not finished)
You'll have to sign-up, then login. Its session based auth.
Once you are logged in, close the brower, then go back. You shouldnt be logged in when you go back.
I'll also glady delete you from my database if you want to.
Go Here: http://bleedingday.com/bd3/ (not finished)
You'll have to sign-up, then login. Its session based auth.
Once you are logged in, close the brower, then go back. You shouldnt be logged in when you go back.
I'll also glady delete you from my database if you want to.
Last edited by fatal on Mon Jun 30, 2003 4:34 am, edited 1 time in total.
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
You can use mulit sessions vars... In my validation function I set:
And Thats all.
The you would call it the same way:
Code: Select all
$_SESSION["user_name"] = $user_name;
$_SESSION["privs"] = $privs;
echo"You successfully logged in.";The you would call it the same way:
Code: Select all
<?php
echo $_SESSION['user_name'];
echo $_SESSION['privs'];
?>-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
@twigle
how does php know what is my web and which is an other?
for example i got two webs on my webserver
/www/web1
/www/web2
and each one has multiple php sites in different sub-folders
how does php determine what belongs to one web and what to another?
i guess I'm gonna use session_name() just in case ...
how does php know what is my web and which is an other?
for example i got two webs on my webserver
/www/web1
/www/web2
and each one has multiple php sites in different sub-folders
how does php determine what belongs to one web and what to another?
i guess I'm gonna use session_name() just in case ...
- twigletmac
- Her Royal Site Adminness
- Posts: 5371
- Joined: Tue Apr 23, 2002 2:21 am
- Location: Essex, UK
-
Tubbietoeter
- Forum Contributor
- Posts: 149
- Joined: Fri Mar 14, 2003 2:41 am
- Location: Germany
they got urls like
http://webserver/www/web1/login.php
http://webserver/www/web2/login.php
this is all in an intranet
http://webserver/www/web1/login.php
http://webserver/www/web2/login.php
this is all in an intranet