PHP Classes

File: restAPI/views/login-single.php

Recommend this page to a friend!
  Classes of Hicri   PHP MySQL REST API Generator   restAPI/views/login-single.php   Download  
File: restAPI/views/login-single.php
Role: Auxiliary script
Content type: text/plain
Description: Auxiliary script
Class: PHP MySQL REST API Generator
Provides an API to access MySQL tables with models
Author: By
Last change:
Date: 1 year ago
Size: 389 bytes
 

Contents

Class file image Download

<?php
header
("Acces-Control-Allow-Origin: *");
header("Access-Control-Allow-Methods: POST");



if (
$_SERVER["REQUEST_METHOD"] === "POST") {



   
http_response_code(200);
    echo
json_encode(array(

       
"status" => 1,
       
"data" => $data,
       
"message" => "Succesful"

   
));

}else {


   
http_response_code(503);
    echo
json_encode(array(
       
"status" => 0,
       
'message' => "Error - Acces!"

   
));
}

?>