I just want to ask, i have 3 dates, the date today, the date_of_needed and the other date which is 2 weeks ahead, i have this code:
$DateNeeded = $this->input->post('date_of_need');
$newDate = date("m-d-y",strtotime("+2 weeks"));
$d = $this->input->post('dateavail');
When I echo those 3 dates i come up with this:
Date Needed: 9/12/16
Date to be Reserved: 9/24/16
Date Today: 9/10/16
I want to have a logic that will make me unavailable to reserve a products if it is less than 2 weeks. How will i do that? Here is my logic
if($DateNeeded < $newDate){
echo "You need to reserve 2 weeks ahead!";
}
But it isnt working.. Thank you for helping me