Active page
| From: | Budi Kelana | Date: | Thu, 22 Aug 2002 07:01:39 +0000 |
| Subject: | Active page | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-113598@lists.php.net to get a copy of this message | ||
Hi,
I want to make a web page that can retrive data from my tables
automatically, periodically.
Does PHP have some timer control ?
I know we can do with JavaScript (setInterval() or setTimeOut()) but I
cann't join java script with PHP.
I've tried make simple script with JavaScript to open new window that
contain PHP script for show current time every 5 seconds.
function showData() {
newWindow = Window.open('data.php','screen');
}
function loadData() {
setInterval('showData()','5000')
}
data.php :
<?
echo date("l dS of F Y h:i:s A");
?>
in result, data.php will reload every 5 seconds, but it doesn't change.
Can someone help me and give me suggestion ?
TIA
regards,
Budi Kelana