-
Автор темы
- #1
trying to do gamesense notifications shit with js and php can somebody tell me what im doing wrong in php? js is copied from .pub
that's what i got
this is how it should look like
javascript (
php
that's what i got
this is how it should look like
javascript (
Пожалуйста, авторизуйтесь для просмотра ссылки.
)php
PHP:
if (empty($_POST["csrf_token"])) {
} else {
$username = $_POST["csrf_token"];
$query = ("SELECT * FROM posts WHERE message LIKE '@$username'");
$result = $db->query($query) or error('Unable to fetch user info', __FILE__, __LINE__, $db->error());
while($row = $result->fetch_assoc()) {
$id = $row["id"];
$date = $row["posted"];
echo json_encode(array("id" => $id, "date" => $date));
exit;
}
}
Последнее редактирование: