SitePoint Sponsor

User Tag List

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

    PHP Authentication with Cookies

    ok, here is my setup: i have a website with some PHP scripts running on IIS with a MySQL backend. My database contains a user table with all of the basic info for each of the users registered at my site (username, password, email, etc..) Ive done some basic PHP_AUTH_USER/PW in my scripts so i can block access to anonymous and lower end users while providing greater features for the higher end ones (and admins).

    Ive now come to the point where i need to customize my site more based upon everyones user rights and so i need to integrate cookies and PHP authorization into each other (so when they log onto my site, like a messageboard, it sets thier info in a cookie so when they come back later, they dont need to log in again). im very very new at cookies and a moderate newbie at PHP and MySQL so i am very unsure as to how to create an authentication script that would do all of the above.

    Any advice?
    signature

  2. #2
    SitePoint Addict
    Join Date
    Apr 2001
    Location
    None
    Posts
    254
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Read the manual:
    http://www.php.net/manual/en/function.setcookie.php

    See some examples and user comments on that page.


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
  •