php - check if its the next week or more from the latest update -
i banging head little strtotime , trying figure out how need achieve.
ill write in logic need not php need.
$today = today $lastupdated = query db if today >= $lastupdated(next week) else else
basically allowed submit form once week, not once every 7 days have now. think need use strtotime somehow achive need im little lost
odd
appear have got working intended:
$userdate = "2016-02-06"; $userupdate = date('y-m-d', strtotime($userdate. ' next week')); $today = date('y-m-d'); echo "userupdate: " . $userupdate . "///////////"; echo "today: " . $today . "///////////"; if ($today >= $userupdate): echo "bigger"; else: echo "smaller"; endif;
Comments
Post a Comment