$month = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
$month = $_POST['month'];
$year = $_POST['year'];
$day = $_POST['day'];
$dateOfDoc = "$year/$month/$day";
$date_now = date("Y/m/d");
if($dateOfDoc >= $date_now){
echo"yes u can upload";
} else {
echo "no u can't upload";
}
I am trying to compare today and the user input date and I should allow user if the user input date should be more than today but I always get false part even user put tomorrow's date example )
today : 2019 04 25
user date : 2019 04 05 return false
today : 2019 04 25
user date : 2019 12 05 return true
what's wrong with my code?