A simple string comparison will do:
$today = date("Y-m-d");
$date = $_POST['year'] . '-' .
str_pad($_POST['month'], '0', 2, STR_PAD_LEFT} . '-' .
str_pad($_POST['day'], '0', 2, STR_PAD_LEFT);
if ($date > $today) {
// future date
} else {
// something else
}
Or:
if (strtotime("{$_POST['year']}-{$_POST['month']}-{$_POST['day']}") > time()) {
// future date
}
This is not entirely the same because time()
also has both a date AND time component, but it should work just fine as well.