//expiration
$datetoday = date("F j, Y, G:i");
$expquery = mysql_query("SELECT a_expire FROM regform_admin WHERE status = 'Pending for payment'");
$row = mysql_fetch_array($expquery);
$expirydate = $row['a_expire'];
echo "$datetoday";
echo "$expirydate";
if ($datetoday == $expirydate) {
$expirequery = mysql_query("UPDATE regform_admin SET status = 'Expired' WHERE status = 'Pending'");
$expirequery2 = mysql_query("UPDATE regform SET status = 'Expired' WHERE status = 'Pending'");
}
//end expiration
Hi, I have an expiration of reservation code here. My problem is that if a customer makes a reservation on 23:30 and the reservation will expire at 00:30 (1 hour), I made this code:
$currentdate = date("F j, Y, G:i");
$onehour = date("G") + 1;
$expire = date("F j, Y, $onehour:i");
The $onehour
must increment, but the problem is that the 23:30 reservation must expire at 24:30. But after incrementing the $onehour, the 23:30 results into 24:40. Which my program cannot read since military time of 12am is 00:00 and not 24:00. Can anyone have suggestions in my problem? Thanks. Sorry for the lazy english I was tired of thinking
$expire = date("F j, Y, H:i", strtotime('+1 hour'));
$expire = date("F j, Y, H:i", time()+3600); // 3600 sec in hour
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With