Melly getDog test
This commit is contained in:
@ -24,9 +24,13 @@ $db_connection = new Database();
|
||||
$conn = $db_connection->dbConnection();
|
||||
|
||||
$data = json_decode(file_get_contents("php://input"));
|
||||
// $data = json_decode('{ "qr_id": "m7MdMK" }');
|
||||
|
||||
$returnData = [];
|
||||
$fields = ['fields' => ['qr_id']];
|
||||
|
||||
// if(true)
|
||||
|
||||
// IF REQUEST METHOD IS NOT EQUAL TO POST
|
||||
if($_SERVER["REQUEST_METHOD"] != "POST")
|
||||
{
|
||||
@ -50,7 +54,7 @@ else
|
||||
|
||||
$fetch_user_by_email = "SELECT * FROM `dogs` WHERE `qr_id`=:qr_id";
|
||||
$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();
|
||||
|
||||
// IF THE dog IS FOUNDED BY qr_id
|
||||
|
||||
Reference in New Issue
Block a user