A demo crytpo project in the SwiftUI with clean architecture.
LOGIN PAGE | HOME PAGE | DETAILS PAGE |
---|---|---|
<?php
//an array to display response
$response = array();
if(isset($_POST['username']) && isset($_POST['password']))
{
//getting values
$username = $_POST['username'];
$password = $_POST['password'];
if ($username == "admin" && $password == "admin") {
$response['status'] = true;
$response['message'] = "Login successfully";
echo json_encode($response);
}
else {
$response['status'] = false;
$response['message'] = "Incorrect credentials";
echo json_encode($response);
}
}
else {
$result = array(
'errorCode' => 406,
'error' => 'Error! Insufficient parameters'
);
echo json_encode($result);
}
?>