Next we’ll write function, which will check user with input data from html form. If it is check, we’ll record login into global array $_SESSION, announcing the key, which we can identify login.
What’s happening, when you logout from account in any web site? Session destroys. We created logout.php file, where after starting session we call session_destroy() function, which delete session.