Results 1 to 5 of 5

Thread: functions to be called just before session_destroy?

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    10

    functions to be called just before session_destroy?

    i want to call certain functions/ php files on session_destroy
    say to delete entries in database etc..
    if a user logs in some info is stored to d/b on his login.. user remains inactive for some time..the session is timed out..now the info in the d/b may be misleading..so i want it deleted on session_destroy..HOW DO I DO IT?!!!
    pls..help..!

  2. #2
    scoutt
    Guest
    at the end of your function that deletes the data from the DB just have teh session_destroy function.

  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    10

    on session_destroy()!

    hi scoutt!
    thanx for the rply..
    but i want things to happen *on* session_destroy.. not before it!
    say if a session times out.. the that that went into d/b is not of any interest to me.. so if user is inactive till time out.. his data is to be destroyed..so this can't be done before session_destroy!

  4. #4

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    10

    i forgot to add..!

    when i say Data ..i mean the data enterd by user as well as *session data*!

  5. #5

    Thread Starter
    New Member
    Join Date
    Mar 2002
    Posts
    10

    session_set_save_handler()?

    regarding the things to happen *on* session_destroy()
    i've got hold of session_set_save_handler() which takes a list of ptrs.. ie names of user defined functions open read write close desrtoy and garbage collect.. to send session data into d/b.. by setting session_handler to user in php.ini
    but i think this doesn't allow registered variables...
    why so? now that i can delete data *on* session_destroy
    i want to kknow how to do so on time out????

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width