So what I would like to do is make a countdown based on the date from mysql and make it going down in live mode without the need to refresh.
Code:
<?php
$date = strtotime($row_tournaments['date']);
$remaining = $date - time();
$days_remaining = floor($remaining / 86400);
$hours_remaining = floor(($remaining % 86400) / 3600);
$minutes_remaining = floor(($remaining % 3600) / 60);
$seconds_remaining = ($remaining % 60);
echo "<p>$days_remaining <span style='font-size:.3em;'>dias</span> $hours_remaining <span style='font-size:.3em;'>horas</span> $minutes_remaining <span style='font-size:.3em;'>minutos</span> $seconds_remaining <span style='font-size:.3em;'>segundos</span></p>";
?>
This works fine but I need to refresh so I can see the time going down.
$date = strtotime($row_tournaments['date']);
This is geting the date from database which the format is:
2015-10-11 08:15:31