Skip to content Skip to sidebar Skip to footer

Php Refresh Just A Part Of The Page

helllo so i builded a countdown with php then i noticed that i have to refresh to keep displaying it correctly. so im using: header( 'refresh:1;url=time.php' ); inside my php ,but

Solution 1:

try this

<scripttype="text/javascript"src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.0/jquery.min.js"></script><scripttype="text/javascript">var auto_refresh = setInterval(
    function ()
    {
    $('#Status').load('record.php');
    }, 1000); // refresh every 1000 milliseconds</script><body><divid="Status"></div></body>

make new php file record.php and put your countdown code in it, it will refresh div every second

Post a Comment for "Php Refresh Just A Part Of The Page"