need help with user authentication routine

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • walterbyrd

    need help with user authentication routine

    I am trying to develop a simple user authentication routine.

    I started with something I got from a book called "PHP in Easy Steps."
    It works like this:

    - create a table in a database with basic user information: name,
    login, password
    - create a simple html form which loads "authenticate.p hp" when the
    submit button is pushed.
    - autheticate.php checks the login against the database, and loads the
    next file, if the user is authenticated.

    I have all that working. The problem, if you haven't guessed, is that
    somebody can bypass the entire thing, if that person the the file(s)
    that are loaded after the authetication. i.e.



    So how do I fix this? Cookies? Can I check if the user is authenticated
    in each subsequent file that might be loaded?

  • crucialmoment

    #2
    Re: need help with user authentication routine

    There are a lot of different methods that can be used.
    Start here


    I find it helpful, especially in areas such as session management, to
    view the code of others who have spent time getting it right. Just
    about every open source bb app or content management app includes an
    authentication piece you can learn from.

    phpclasses.org is a valuable resource for learning from other's code.
    (Although object based php might be a little confusing for someone just
    getting started)
    This link will search phpclasses for authentication


    Comment

    Working...