you_route:
resource: "@CustomBundle/Resources/config/routing.yml"
prefix: /{_locale}
requirements:
_locale: en|ru
defaults: { _locale: en}
jQuery.ajax({
type: "POST",
url: "/function/checkTime.php",
data: ({date:date}),
dataType:"json",
success: function(response) {
// тут обрабатываем
}
// Собираем дату;
$date = $_POST['date'];
//Запрос к базе;
$times= $sql->query("SELECT * FROM datetime WHERE date='$date'")->fetch_array();
echo json_encode($times);