Hey just a quick one,

I am working on a site for a mate and he wants a site alert panel so I have served this forum and cant find one that works... can any one tell me where I can get one or help fix this one...

disp.php
PHP Code:
<?php
 
header
("Cache-Control: no-cache, must-revalidate");
 
session_start();
if(!isset(
$_SESSION['alert'])) {
$_SESSION['alert'] = 'no_message';
}
 
$handle fopen('message.txt''r'); 
$message fread($handlefilesize('message.php'));
fclose($handle); 
 
if(
$message != $_SESSION['alert'] && $message != 'none')   {
print 
'<script type="text/JavaScript">alert(\''.$message.'\');</script>';
$_SESSION['alert'] = $message;
}
 
?>
updatealert.php

PHP Code:
<html>
<
head>
<
script>
function 
update() {
document.getElementById('display_alert').src 'disp.php';
setTimeout('update()'10000);
}
</
script>
</
head>
<
body onLoad="update();">
<
iframe id="display_alert" style="display: none" src="disp.php"></iframe>
</
body>
</
html
Thanks +rep any one.