I'm working on a text based browser game. I did a countdown timer with php and mysql. It works fine
but you need to refresh the page to see updated timer. It's not moving like a regular timer.
(Actually not moving at all. )
but I literally know nothing about it.
Before asking any help, I want to explain how my php/mysql countdown timer works.
When user clicks on "Start" button, my php code gets the current time:
$now = time();
and adds 2 hours on $now:
$JobEnd = ($now + 7200);
then sends $JobEnd to mysql database.
When user checks the "Jobs" page, my php code echo's [$JobEnd from mysql database - time()].
I also did a code to convert seconds to minutes and hours to make it look like a regular timer
but as I said it's not moving at all unless you refresh the page.
but moves like a normal timer. Can anyone explain to me how to do that?