Hello
I used this code to show my last forum's post :
I want to know that is there any way to reload last post automatically with AJAX in this code ?
I used this code to show my last forum's post :
Code:
<?php
define("IN_MYBB", 1);
require_once("./global.php"); // Change this if needed
$tlimit = 5; // How many titles you want
$query = $db->query("SELECT * FROM ".TABLE_PREFIX."threads ORDER BY `tid` DESC LIMIT $tlimit");
while($fetch = $db->fetch_array($query)){
echo '<a href="./showthread.php?tid='.$fetch['tid'].'">'.$fetch['subject'].'</a><br />' . "\n";
}
?>
I want to know that is there any way to reload last post automatically with AJAX in this code ?