SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Nov 2004
    Location
    Singapore and Australia
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Storing cookie/session variables in 'include' file

    I have a question regarding the title of this post.

    Basically, what i want to do is after a successful login i create the cookie/session and i store its variables in another php file. This new file will be used by all other files (by using include) to check for session validity.

    How do i go about storing them into another file?

  2. #2
    SitePoint Guru gavwvin's Avatar
    Join Date
    Nov 2004
    Location
    Cornwall, UK
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This would usually involve fopen() and frwite() functions, look them up on php.net. Use fopen to create the file, and frwite to write to it.

  3. #3
    SitePoint Member
    Join Date
    Nov 2004
    Location
    Singapore and Australia
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks alot. I'll check the manual


Bookmarks

Posting Permissions

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