$query = mysql_query("SELECT * FROM ".$dbtable." WHERE news_id="
.$dbtable_id);
$query_array = mysql_fetch_array($query);
if(isset($_POST['cur'])){
echo "запрос отпавлен<br />";
$updQuery = mysql_query('UPDATE '.$dbtable
.' SET `news_content` = "'.$query_array["news_content"]
.'" WHERE news_id ='.$dbtable_id);
}
$result = $sql->query("SELECT * FROM datetime WHERE date='2014-05-24'");
while ($row = $result->fetch_assoc()) {
$times[] = $row;
}
echo json_encode($times);
$.ajax({
type: 'POST',
url: '/function/checkTime.php',
data: ({date: date}),
dataType: 'json',
success: function(data) {
/* тут обрабатываете ответ */
}
});