function unread_message($username) { $query = "SELECT * FROM inbox WHERE Destination='$username'"; $result = mysql_query($query); $total = mysql_numrows($result); if ($total == '') { $total = 0; } }