session_destroy() not removing row from table.

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

session_destroy() not removing row from table.

Post by anjanesh »

Hello
sessoin_start() works fine. I use session_set_save_handler() to store in mysql db. This is in login.php. All the session functions are in login .php. The table gets one new row. The last line on this page redirects it some other page - MemberPage.php
I know the session id by giving $PHPSESSID. In this page there is a link to lohout.php which contains session_destroy(); but unfortunately it does not get destroyed and the row still remains in the table. The session_close() etc are in login.php. It has the delete fn to delete the row in mysql db. Even if I include that code in logout it still does not log out. It does not give an error but givesw a warning.
Pl help
Thanks
Anjanesh
platinum
Forum Newbie
Posts: 6
Joined: Sat Feb 21, 2004 4:20 pm

Post by platinum »

try using session_unregister(); and unregister all your vars that way?
Post Reply