<?php
require(__DIR__ . "/../includes/config.php");
$places = [];
$places = CS50::query("SELECT * FROM places WHERE MATCH(postal_code, place_name) AGAINST (?)", $_GET["geo"]);
header("Content-type: application/json");
print(json_encode($places, JSON_PRETTY_PRINT));
?>
$statement = $handle->query($query);
if ($statement === false)
{
trigger_error($handle->errorInfo()[2], E_USER_ERROR);
}
Find more questions by tags JavaScriptMySQLPHP