Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Dec 2011
    Posts
    14
    Thanks
    2
    Thanked 0 Times in 0 Posts

    Adding passwords to profiles via php

    I've created a small sites where people can make profiles in it via php and was wondering how would i go about password protecting everyones individual sites? Look at the screenshot, afte you select your profile i want to password protect it after you select. Thanks!

    http://i.imgur.com/ikOqjre.png

  • #2
    Regular Coder
    Join Date
    Apr 2004
    Posts
    298
    Thanks
    0
    Thanked 23 Times in 23 Posts
    REAL ROUGH process
    1. create a table with id, username, password, salt
    2. when user first 'registers' store the info into the table
    3. when user logs in, check table. if valid store id into a session variable then redirect user to their appropriate page.
    4. on landing page check to make sure the session variable has been set and that it contains a valid value. if yes, display content; if NO, redirect to an error page


  •  

    Posting Permissions

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