SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Member
    Join Date
    Aug 2001
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    How to use cookie to login?

    I made the login script but i dunno how to use cookie with it...
    help?
    signature

  2. #2
    Grumpy Mole Man Skunk's Avatar
    Join Date
    Jan 2001
    Location
    Lawrence, Kansas
    Posts
    2,066
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    SitePoint Member
    Join Date
    Nov 2001
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In general you need to do something like this:

    user goes to your login page

    page checks if your login cookie is set

    yes? look it up in the database to see if it (md5 hash/user/pass/whatever) is what you expect, if it is send the user on to the page behind the password

    if the cookie is not set or is set but not a proper value, show them the login page to have them fill out your form to login

    put all of this into an file to include on all of your pages that you need to authenticate.

    Greg
    www.phpwebhosting.com - come have a look!


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
  •