diff --git a/docs/Melly.jpg b/docs/Melly.jpg new file mode 100644 index 0000000..7cb9c3c Binary files /dev/null and b/docs/Melly.jpg differ diff --git a/php/php-dog/getDog.php b/php/php-dog/getDog.php index c4c85f6..75ac9a8 100644 --- a/php/php-dog/getDog.php +++ b/php/php-dog/getDog.php @@ -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