Mysql (MariaDB) with PDO

From wikiluntti
Revision as of 20:29, 18 September 2021 by Mol (talk | contribs) (→‎Log a user)

Introduction

Some of my database stuff is shown.


Establishing connection to the server

Store the password into a secure place, thus outside the the www folder. Php can access that.

Log a user

SSL connection. Hash and salt. Php password hashing functions and mainly password_hash with password_verify.

Check the database if the username is exists. If it is, fetch the password hash and compare that against the user inputted hash.