<code>
<?php
$link = mysql_connect("localhost", "root", "");
mysql_select_db("jive", $link) or die("Problems Selecting DB");
$user = $_SESSION['username'];
$message = "SELECT *
FROM `messages`
WHERE `to` = '$user'
AND `read` = 'no'";
$result = mysql_query("$message", $link) or die("Query Error $message");
$num_rows = mysql_num_rows($result);
print "Inbox ($num_rows)";
</code>
I want to make that happen real time ie not just when the page refreshes - is this possible?
Tags: