vinoindiamca Posted December 26, 2008 Share Posted December 26, 2008 Hi , I Need help if given date is between $firstDate1 and $firstDate2 then do $payment=$offroomamt * $days; else if given date is not in $firstDate1 and $firstDate2 then echo"Invalid date"; For this i need code for "not greater than" and "not lessthan" symbol to proceed validation i used following code but it gives error please give the solution to check not greater than also if($typroom=='1' && $sestime=='1') { if( $arrivaldt >= $firstDate1 && $arrivaldt <= $firstDate2 ) { $payment=$offroomamt * $days; } if( $arrivaldt >= $secondDate1 && $arrivaldt <= $secondDate2 ) { $payment=$sesroomamt * $days; } //i need help in below code if( $arrivaldt !>= $firstDate1 && $arrivaldt !<= $firstDate2 ) { echo"Invalid date"; } if( $arrivaldt !>= $secondDate1 && $arrivaldt !<= $secondDate2 ) { echo"Invalid date"; } } Link to comment https://forums.phpfreaks.com/topic/138466-php-validation-problem/ Share on other sites More sharing options...
Mchl Posted December 26, 2008 Share Posted December 26, 2008 Opposite to >= is < Link to comment https://forums.phpfreaks.com/topic/138466-php-validation-problem/#findComment-723945 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.