How do I authenticate a user in PHP / MySQL?

前端 未结 7 1508
春和景丽
春和景丽 2020-12-08 09:26

So recently I learned how to properly add a username and password to a database. My database is usersys, and the table storing user information is called userdb. The table h

7条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 09:35

    I would also think about not storing passwords in your database. One way hashes with MD5 or SHA1 are a way of adding a layer of security at the db level.

    See http://php.net/md5 or http://php.net/sha1 for further information.

提交回复
热议问题