Getting started with Authentication in PHP. Login, registration of users from scratch


Contents:


User registration: create a form
In this and the following lessons, we'll look at registering and authenticating users with PHP &...
Registration form class
Create a class that models our form. Let's call it RegistrationForm, and the file -
Saving users to the database
So, we have the tableusers(id, email, username, password). In this case, the password field h...
Form for entry and class form
Create in the file login.php markup with login form: [php]<form method="post"> ...
Session class
We will create a class for convenient work with sessions. It will contain methods for creating, dele...
Authentication
First, place the call to session_start () function at the beginning of all scripts, where we need a ...