session_start(); require_once("admin/incl/dbopenconn.php"); if (isset($_POST['month_selector'])) { //echo $_POST['month_selector']; list($char1, $char2,$char3) = split('-',$_POST['month_selector']); //echo $char3; //echo $char2; $QryUser = @mysql_query("Select * from MSTEVENT where Month(startdate)= '".$char2."' and Year(startdate)='".$char3."' order by eventid desc " ,$connect); } else { $QryUser = @mysql_query("Select * from MSTEVENT order by eventid desc" ,$connect); } ?>