Count Down

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

    I want to display a countdown timer.  For this i used frames, the 
top frame contains the time and the bottom frame contains the 
questions, the top frame refreshes (autorefresh every second), After 
reaching the target time, a new page has to be loaded (redirect to a 
new page, which contains the message test time is over).  How to do 
this? The below code is not redirecting to the timeover page

frame.php

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd";>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-
1">
</head>

<frameset rows="80,*" frameborder="NO" border="0" framespacing="0">
  <frame src="head.php" name="topFrame" scrolling="NO" noresize >
  <frame src="body.php" name="mainFrame">
</frameset>
<noframes><body>

</body></noframes>
</html>


head.php

<?php
ob_start();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>

<?php
$target="1087672442";
echo time();
if($target<=time())
{
header("Location:time_over.php");//redirect to timeover page
}  

?>
<meta http-equiv="refresh" content="1;URL=head.php">
</head>

<body>

</body>
</html>
<?php
ob_end_flush();
?>


body.php

contains the test questions


Thanks,

Bye





PHP Data object relational mapping generator
http://www.metastorage.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux