mysqli count down
//CALCULATES SECONDS UNTIL THE EVENT
$remaining = strtotime($date['date']) - $today;
mysqli count down
//CALCULATES SECONDS UNTIL THE EVENT
$remaining = strtotime($date['date']) - $today;
mysqli count down
<?php
include("php/db_connect.php");
//TODAY'S DATE
$today = time();
//FETCHES DATE AND TIME FOR THE EVENT FROM DATABASE
$sql = "SELECT * FROM countdown";
$result = mysql_query($sql) or die(mysql_error());
$date = mysql_fetch_array( $result );
//CALCULATES SECONDS UNTIL THE EVENT
$remaining = $date['date'] - $today;
//CALCULATE DAYS UNTIL THE EVENT
$days_remaining = floor($remaining / 86400);
echo "<div class='countdown'> $days_remaining days until event</div>";
?>
mysqli count down
//CALCULATES SECONDS UNTIL THE EVENT
$remaining = $date['date'] - $today;
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us