Melly getDog test
This commit is contained in:
BIN
docs/Melly.jpg
Normal file
BIN
docs/Melly.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 142 KiB |
@ -24,9 +24,13 @@ $db_connection = new Database();
|
|||||||
$conn = $db_connection->dbConnection();
|
$conn = $db_connection->dbConnection();
|
||||||
|
|
||||||
$data = json_decode(file_get_contents("php://input"));
|
$data = json_decode(file_get_contents("php://input"));
|
||||||
|
// $data = json_decode('{ "qr_id": "m7MdMK" }');
|
||||||
|
|
||||||
$returnData = [];
|
$returnData = [];
|
||||||
$fields = ['fields' => ['qr_id']];
|
$fields = ['fields' => ['qr_id']];
|
||||||
|
|
||||||
|
// if(true)
|
||||||
|
|
||||||
// IF REQUEST METHOD IS NOT EQUAL TO POST
|
// IF REQUEST METHOD IS NOT EQUAL TO POST
|
||||||
if($_SERVER["REQUEST_METHOD"] != "POST")
|
if($_SERVER["REQUEST_METHOD"] != "POST")
|
||||||
{
|
{
|
||||||
@ -50,7 +54,7 @@ else
|
|||||||
|
|
||||||
$fetch_user_by_email = "SELECT * FROM `dogs` WHERE `qr_id`=:qr_id";
|
$fetch_user_by_email = "SELECT * FROM `dogs` WHERE `qr_id`=:qr_id";
|
||||||
$query_stmt = $conn->prepare($fetch_user_by_email);
|
$query_stmt = $conn->prepare($fetch_user_by_email);
|
||||||
$query_stmt->bindValue(':qr_id', $email,PDO::PARAM_STR);
|
$query_stmt->bindValue(':qr_id', $qr_id,PDO::PARAM_STR);
|
||||||
$query_stmt->execute();
|
$query_stmt->execute();
|
||||||
|
|
||||||
// IF THE dog IS FOUNDED BY qr_id
|
// IF THE dog IS FOUNDED BY qr_id
|
||||||
|
|||||||
Reference in New Issue
Block a user