Categories

An updating clock

This is a clock that updates, it actually merely does a refresh every 1 second, this is assuming that you create a file called clock.php and copy the examnple below into it

<HTML>
<HEAD>
<TITLE></TITLE>
<META HTTP-EQUIV=”refresh” CONTENT=1″; URL=clock.php”>
</HEAD>
<BODY>
<?php
Print “The time is: “;
$hour = date(‘H’); //hours.
$minute = date(‘i’); //minutes.
$seconds = date(’s’); //seconds
$time = “$hour : $minute : $seconds”; //put them together
Print $time
?>
</BODY>
</HTML>

No related posts.

Related posts brought to you by Yet Another Related Posts Plugin.

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>