get_result ( ); $row = $result->fetch_assoc ( ); if ( ! $row ) { header ( 'Content-Type: application/json' ); $response = [ 'status' => 401, 'error_message' => 'Username or password not correct.', ]; echo ( json_encode ( $response ) ); } else { $_SESSION [ 'user_id' ] = $row [ 'id' ]; header ( 'Content-Type: application/json' ); $response = [ 'status' => 200, 'message' => 'Authentication succesfully executed.', ]; echo ( json_encode ( $response ) ); } } else { ?> BJPHoster URL Shortener | Login