Hi my php script has two textboxes (one for month and one for year). When the user presses the submit button, it should verify the inputs to see if the dates are expired. Here is the code I made, but it doesnt seem to do anything.
$input_date = "$_POST['m']/$_POST['y']";
$todays_date = date("MM/YY");
if ($input_date < $todays_date)
{
print '<p class = "error">Date has elapsed</p>';
}
Note: the date format is MM/YYYY (textbox ‘m’ contains MM and tetxbox ‘y’ contains YYYY)
You can use mktime() or strtotime()