PHP to determine if time has past on the server
-
I’m trying to figure out how to make this statement work so that the products I show on the front of the site have a Link titled Pre-Order if the Release date has not past and Order if the release date is today or has past.. this is what I have so far, but it doesn’t spit out what I thought it would…
if(!empty($result["released"])) { $result["released"] = date('d/m/Y', strtotime($result["released"])); } if($result["released"] >= date('d/m/Y')){ $preorder = ('ORDER'); } else{ $preorder = ('PREORDER'); }
Any ideas here?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘PHP to determine if time has past on the server’ is closed to new replies.