CSS
File style.css
.vert1 {
padding-top:20px;
}
.container1 {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
}
.container2 {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
background-color: #cccccc;
height: 50%;
width: 50%;
}
PHP
File login.php
<?php
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE');
header('Access-Control-Allow-Headers: Content-Type, Authorization, X-Requested-With');
header('Content-Type: application/json');
$response = array();
$response['success'] = false;
if ($_REQUEST['login']=='evgen' && $_REQUEST['password']=='12345')
{
$response['success'] = true;
$response['token'] = "123123dasa213ws212";
}
echo json_encode($response);
?>