Struggling to find a way to do this. I have an html table that is loaded from the database whenever a new user logs into the site. What I need to do is refresh the data in the html for all logged in users when someone new logs in. Then all logged in users will be able to see the latest list of logons.
Here's the table code for reference:
- <?php
if ($ncs_callsign != 'NONE' && $_SESSION['User_Callsign'] != null)
{
// The Monitors table
echo "<div id=\"scroll\">";
echo "<p id=\"MONS\"> Net Monitors </p>";
echo "<table id=\"monitors\" align=right>";
echo "<tr><th>Callsign</th><th>Name</th></tr>";
$query = "SELECT * FROM k4elo_brothers.monitors";
$result = mysql_query($query);
while($row=mysql_fetch_array($result))
{
$mon_callsign = strtoupper($row['callsign']);
$mon_name = $row['name'];
echo "<tr><td style='width: 100px;'>".$mon_callsign."</td><td style='width: 100px;'>".$mon_name."</td></tr>";
//echo "loading table";
}
echo"</table>";
echo"</div>";
}
?>
The table loads and displays ok for each new user logging in but how to reload it for existing users so they can see the new logon?
Any suggestions are welcome!