Files
safechat/html/get.php

11 lines
310 B
PHP
Raw Normal View History

2015-06-28 20:58:51 +00:00
<?php
require_once("messagetable.php");
try {
$start = $db->real_escape_string($_REQUEST['start']);
$q = $db->query("select id, UNIX_TIMESTAMP(time) as time, user, msg from message where id>$start;");
echo json_encode($q->fetch_all(MYSQLI_ASSOC));
} catch (Exception $e) {
echo json_encode(null);
}
?>