Suspending a Session

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
Squeaku
Forum Newbie
Posts: 1
Joined: Fri Jun 17, 2005 12:14 pm

Suspending a Session

Post by Squeaku »

I'm working on a project for school. We're making MP3 download sites where you sign up for an account and use your credit card to get credits for downloading music.

I need help with how to log-out and suspend the session without terminating the mysql data in the users table. Any help would be appreciated.
User avatar
shiznatix
DevNet Master
Posts: 2745
Joined: Tue Dec 28, 2004 5:57 pm
Location: Tallinn, Estonia
Contact:

Post by shiznatix »

suspend the data like you mean

Code: Select all

$_SESSION = array();
unset($_SESSION);
or if you want to just kinda backup the session without destroying it you could make a copy of the session with a fk_the_original_session_name_here or somthing so once you want to start using it again you could just go back and do the same thing
asmie
Forum Newbie
Posts: 11
Joined: Mon Jun 20, 2005 8:45 am

Post by asmie »

Hie,

You can unset sessions using the session_unset() function.

The session_unset() function frees all session variables currently registered.


Hope this helps !

Asmie
Syranide
Forum Contributor
Posts: 281
Joined: Fri May 20, 2005 3:16 pm
Location: Sweden

Post by Syranide »

First off I don't see how it would affect the database anyhow?
Is there something temporary in the database?
Post Reply