|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Sessions/Logout
I am using a rather old version of PHP which is 4.0.5
Why is it when i close the browser, the session files are still in /tmp directory? Wouldn't they be destroyed automatically? Another thing is i have two frames in a frameset, a left and the main one. I am logging out from my left frame calling logout.php which is using header("Location: login.php"); to redirect me to the login page. The problem is, the login page is loaded in my left frame! How do i cause the header function to redirect me to a new page by itself? Thank you.
__________________
Beginner |
|
#2
|
||||
|
||||
|
To destroy the session you have to use session_destroy() I know htere is a global vaiable to mak eit even easier but I don't know what it is.
as for your other problem, did you set the links target for main(or whatever name you gave to the main area of the frameset)?
__________________
CHornJr "One day I'll know what I am doing" ![]() My Blog Suanhacky Lodge #49 Rebel Squadrons |
|
#3
|
|||
|
|||
|
I have a button for users to specifically logout and this calls session_destroy(). It worked. But I have read somewhere that when you close the browser window, the session will be destroyed too... Not in my case..
As for my other problem, the trick is, how do i specify to the header function to redirect me to a specific frame location? i know i can do this with a normal <a> tag link with the target attribute..but this is a header() function.. thanks for your reply. |
![]() |
| Viewing: Dev Articles Community Forums > Programming > Programming Tools > Sessions/Logout |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|