hey guys ...
can anybody tell me a php logout script.
I want to log out from one page which i was developing ,
i tried but it's not working. I have tried
session_destroy(),session_unset() functions
but they are not working.
If any one is having that script then please help me . 7 9331
pank wrote:
hey guys ...
can anybody tell me a php logout script.
I want to log out from one page which i was developing ,
i tried but it's not working. I have tried
session_destroy(),session_unset() functions
but they are not working.
If any one is having that script then please help me .
Session_destroy should destroy all variables you have set in $_SESSION
Are you saying that the Session state is kept even after you close all
browsers?
Are you sure you're not using other cookies rather than Session data?
Tyno Gendo wrote:
pank wrote:
>hey guys ... can anybody tell me a php logout script. I want to log out from one page which i was developing , i tried but it's not working. I have tried session_destroy(),session_unset() functions but they are not working. If any one is having that script then please help me .
Session_destroy should destroy all variables you have set in $_SESSION
No it does NOT. They are valid as long as the script runs. A call to
$_SESSIONS=array(); after the session_destroy() clears the session
variables.
Sh.
On 13 Apr, 20:48, Schraalhans Keukenmeester <bitbuc...@invalid.spam>
wrote:
Tyno Gendo wrote:
pank wrote:
hey guys ...
can anybody tell me a php logout script.
I want to log out from one page which i was developing ,
i tried but it's not working. I have tried
session_destroy(),session_unset() functions
but they are not working.
If any one is having that script then please help me .
Session_destroy should destroy all variables you have set in $_SESSION
No it does NOT. They are valid as long as the script runs. A call to
$_SESSIONS=array(); after the session_destroy() clears the session
variables.
Sh.
Does it HAVE to be that way around? I usually do it the other way
around: session_destroy then $_SESSIONS=array() and it works fine for
me.
If the original poster is doing this and still has problems; I would
suggest checking the session name on your logged in pages and also the
logging out page. Use the session_name() function to see this.
Personally I always use a custom session name for `security` purposes.
FrobinRobin wrote:
On 13 Apr, 20:48, Schraalhans Keukenmeester <bitbuc...@invalid.spam>
wrote:
>Tyno Gendo wrote:
>>pank wrote: hey guys ... can anybody tell me a php logout script. I want to log out from one page which i was developing , i tried but it's not working. I have tried session_destroy(),session_unset() functions but they are not working. If any one is having that script then please help me . Session_destroy should destroy all variables you have set in $_SESSION
No it does NOT. They are valid as long as the script runs. A call to $_SESSIONS=array(); after the session_destroy() clears the session variables.
Sh.
Does it HAVE to be that way around? I usually do it the other way
around: session_destroy then $_SESSIONS=array() and it works fine for
me.
If the original poster is doing this and still has problems; I would
suggest checking the session name on your logged in pages and also the
logging out page. Use the session_name() function to see this.
Personally I always use a custom session name for `security` purposes.
I was a bit ambiguous in my phrasing. I use the same order you do.
technically I don't think there's much against the other way around,
from a logical point of view I think 'yours' is the preferred.
Sh.
Schraalhans Keukenmeester wrote:
FrobinRobin wrote:
>On 13 Apr, 20:48, Schraalhans Keukenmeester <bitbuc...@invalid.spam> wrote:
>>Tyno Gendo wrote: pank wrote: hey guys ... can anybody tell me a php logout script. I want to log out from one page which i was developing , i tried but it's not working. I have tried session_destroy(),session_unset() functions but they are not working. If any one is having that script then please help me . Session_destroy should destroy all variables you have set in $_SESSION No it does NOT. They are valid as long as the script runs. A call to $_SESSIONS=array(); after the session_destroy() clears the session variables.
Indeed. I've only ever used session_destroy() as the last statement
before quitting the page, so I never noticed. Seems a bit crap, after
all, you're asking it to 'destroy' the session, does anyone have a use
for destroying it and _still_ retaining the variables until script end?
Tyno Gendo wrote:
Schraalhans Keukenmeester wrote:
>FrobinRobin wrote:
>>On 13 Apr, 20:48, Schraalhans Keukenmeester <bitbuc...@invalid.spam> wrote: Tyno Gendo wrote: pank wrote: >hey guys ... > can anybody tell me a php logout script. >I want to log out from one page which i was developing , >i tried but it's not working. I have tried >session_destroy(),session_unset() functions >but they are not working. > If any one is having that script then please help me . Session_destroy should destroy all variables you have set in $_SESSION No it does NOT. They are valid as long as the script runs. A call to $_SESSIONS=array(); after the session_destroy() clears the session variables.
Indeed. I've only ever used session_destroy() as the last statement
before quitting the page, so I never noticed. Seems a bit crap, after
all, you're asking it to 'destroy' the session, does anyone have a use
for destroying it and _still_ retaining the variables until script end?
I never destroy a session. Rather, I unset variables which are no
longer needed. Destroying a session might make other pages start to fail
because of session variables they use.
And maybe the site doesn't have this potential problem now - but what
about later? It's things like this which take hours (or days) to track
down.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp. js*******@attglobal.net
==================
Jerry Stuckle wrote:
Tyno Gendo wrote:
>Schraalhans Keukenmeester wrote:
>>FrobinRobin wrote: On 13 Apr, 20:48, Schraalhans Keukenmeester <bitbuc...@invalid.spam> wrote: Tyno Gendo wrote: >pank wrote: >>hey guys ... >> can anybody tell me a php logout script. >>I want to log out from one page which i was developing , >>i tried but it's not working. I have tried >>session_destroy(),session_unset() functions >>but they are not working. >> If any one is having that script then please help me . >Session_destroy should destroy all variables you have set in >$_SESSION No it does NOT. They are valid as long as the script runs. A call to $_SESSIONS=array(); after the session_destroy() clears the session variables.
Indeed. I've only ever used session_destroy() as the last statement before quitting the page, so I never noticed. Seems a bit crap, after all, you're asking it to 'destroy' the session, does anyone have a use for destroying it and _still_ retaining the variables until script end?
I never destroy a session. Rather, I unset variables which are no
longer needed. Destroying a session might make other pages start to fail
because of session variables they use.
And maybe the site doesn't have this potential problem now - but what
about later? It's things like this which take hours (or days) to track
down.
<coughI wish I could say "I haven't got the faintest idea what you
mean Jerry" </cough;-)
Sh. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Harlin Seritt |
last post by:
I have a remote linux server where I can only access it via ssh. I have
a script that I need to have run all the time. I run like so:
python script.py &
It runs fine. When I log off ssh I...
|
by: Michael D. Jones |
last post by:
Hi all,
I would like to have a delay on a logout page. Here is what I have so far:
logout.aspx
-----------
Page_Load()
FormsAuthentication.SignOut();
Thread.Sleep(5000);
|
by: kamill |
last post by:
I have done a logout page for logout from admin section and provides a link to logout from admin section.Whenever i clicked on logout link it redirected to index.php of admin section......BUT when i...
|
by: muchexie |
last post by:
I have created a log in system and logging in is functioning but logging out is not working its showing error warnings.
logout.php
<?
//include function files for this application...
|
by: chaos |
last post by:
How to do logout alert message when i press on the logout image
<a href="../logout.php" target="_top" onClick="return logout()"...
|
by: thesti |
last post by:
hi,
i'm learning and trying to develop a web with php. the logout script of mine seems not working since that after i pressed the logout link. i still get the greeting "welcome, 'username' ".
...
|
by: Thiago Macedo |
last post by:
I could not find on the web a complete solution for this task.
This is not the perfect solution, because it's doesn't have the
ability to log the logout if browser crash or user leave it open while...
|
by: DavidPr |
last post by:
When I logout as one user and log in under a different user, it opens with the last user's information.
User 1 - Unsername: Davey Jones
User 2 - Unsername: David Smith
I log out from Davey...
|
by: phpuser123 |
last post by:
Hi,I have created a script where I want to use onclick event and javascript to log out.Here r my coodes ..
<script type="text/javascript">
function logout(){
<?php...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |