You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
336 B
PHTML

8 months ago
<?php
$mysqli = require __DIR__ . "/database.php";
$sql = sprintf("SELECT EXISTS (SELECT * FROM nfc WHERE nfc = '%d')",$mysqli->real_escape_string($_GET["nfc"]));
$result = $mysqli->query($sql);
$token_yes = $result->fetch_row()[0] === 1;
header("Content-Type: application/json");
echo json_encode(["tokenyes" => $token_yes]);
?>