Can any one tell me what's wrong with this code? it's just keep giving me this message "Pick up Date atleast 24hrs after the current Date";
$pDate = $_GET['txtPDate'];
$pTime = $_GET['txtPTime'];
$dateArray = explode('-',$pDate);
$timeArray = explode('.',$pTime);
$hours = (int)$timeArray[0];
$minutes = (int)$timeArray[1];
$day = (int)$dateArray[0];
$month = (int)$dateArray[1];
$year = (int)$dateArray[2];
$userPTimes = mktime(date($hours),date($minutes),0,date($month), date($day), date($year));
$userCurrentTime = mktime(0, 0, 0, date($day), date($month), date($year));
$userupperlimit = mktime(date(7), date(30), date(0), date($day), date($month), date($year));
$userlowerlimit = mktime(date(20), date(30), date(0), date($day), date($month), date($year));
$dayafter = mktime(0, 0, 0, date($day +1), date($month), date($year)); // I wanted $dayafter to 24 hours after the $pdate
if($userCurrentTime < $dayafter)
{
echo "Pick up Date atleast 24hrs after the current Date";
}
else if(!($userPTimes >= $userupperlimit) || !($userPTimes <= $userlowerlimit ))
{
echo "Pick up Time should be between 7.30 - 20.30";
}