Auto update time and date

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
afr_dnf2011
Forum Newbie
Posts: 14
Joined: Mon Mar 21, 2011 8:20 pm

Auto update time and date

Post by afr_dnf2011 »

How can I auto update time and date in php without refresh the page?

It can do that using javascript. But can't find a way to do that using php.
User avatar
Darhazer
DevNet Resident
Posts: 1011
Joined: Thu May 14, 2009 3:00 pm
Location: HellCity, Bulgaria

Re: Auto update time and date

Post by Darhazer »

You cannot because of the way http (and browser) works. Even if you keep the connection open, you need a client-side code (javascript) to interpret the new data and display it on the page.
User avatar
afr_dnf2011
Forum Newbie
Posts: 14
Joined: Mon Mar 21, 2011 8:20 pm

Re: Auto update time and date

Post by afr_dnf2011 »

Thanks Darhazer for your reply. Yes, I understand now.
Post Reply