1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

passwords

Discussion in 'Site & Server Administration' started by xamd404, Feb 17, 2011.

  1. #1
    Hello everyone,

    I am wondering what the best or a good way to keep passwords secure was. Currently I have password field in a users table but the passwords are text.

    Is this a bad idea and if so what other alternatives are there?

    Thank you
     
    xamd404, Feb 17, 2011 IP
  2. ARTidas

    ARTidas Active Member

    Messages:
    177
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    53
    #2
    md5...

    Encrypt the password with md5 (php: md5() function)

    When someone try to log in, you simply read the form password and encrypt thar too. So:

    if ( md5($formpassword) === $database_stored_password ) {
       print 'successful login';
    }
    else {
      print 'YOU SUCK!!!';
    }
    Code (markup):
    Cheers,
     
    ARTidas, Feb 17, 2011 IP
  3. xamd404

    xamd404 Peon

    Messages:
    20
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    OK thank you very much *thumbs up*
     
    xamd404, Feb 17, 2011 IP
  4. Nancycy

    Nancycy Greenhorn

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    11
    #4
    Good idea......
     
    Nancycy, Feb 17, 2011 IP