if(isset($_POST['calendar'])) $fecha = $_POST['calendar'];else $fecha = date('Y-M-D');/*.....*/WHERE ca_dateout=".$fecha."