or download this
$SQL = "SELECT * from $reservations_table where approved!='declined' a
+nd date > '$dateadded2' OR (date = '$dateadded2' and militaryendtime
+> '$hourmin' and approved!='declined' and approved!='cancelled') orde
+r by date asc, militarytime asc";
...
}
}