0
0
Fork 0
This repository has been archived on 2020-08-03. You can view files and clone it, but cannot push or open issues or pull requests.
bryanpedini.it_old/lib/php/user_login.php

12 lines
375 B
PHP

<?php
$user = [
'username' => $_POST [ 'username' ],
'password' => $_POST [ 'password' ],
];
if ( false ) {
//TODO: ask the database if the user exists and check if the password is correct then
}
else {
header ( "Location /" ); //TODO: modify with json response with "Wrong username or password" message
exit;
}