 <?php
 session_start();
 
  include("../includes/conect.php");
  include("../includes/timezone.php");
  
  if(isset($_POST['confirmar'])){

  	$idreserva = $_POST['confirmar']; 
  	$user_in = $_SESSION['k_id_table'];




	  	// cancelación de reserva
	  	$query_search = 'UPDATE ocupante_reserva SET verificado = 1, user_in =\''.$user_in.'\', verify_date =\''.$fecha_hoy.'\', verify_time =\''.$hora_actual.'\' WHERE id_tabla =\''.$idreserva.'\'';
	    if (!$result = mysqli_query($conexion, $query_search)) {
	        exit(mysqli_error());
	        header("location:../dashboard.php?fail=fail");
	    }  
        else
        {     
            // registro exitoso
            header("location:../dashboard.php?up=up");
        }
 

  }else{

  	 header("location:../dashboard.php?fail=fail");

  }

  ?>