I need help writing an if statement that checks if coupon code = "10off" and $_POST['date'] = any date between today and October 10, 2012.
Basically, if it's a date outside of that range it will say "The 10% coupon must be redeemed by Wednesday October 10, 2012. Please go back and choose an allowed date."
I've tried researching arrays but can't figure out how to do this. Would someone mind helping me out?
Thank you

Code: Select all
<?php
if (($_POST['couponcode'] == "10off") && ($_POST['date'] !== "10/03/12" )) {
echo "The 10% coupon must be redeemed by Wednesday October 10, 2012. Please go back and choose an allowed date.";
die;
}
?>