12 lines
375 B
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;
|
|
} |