<?php
  $user_check = $_SESSION['id_session'];
  $query = "
    SELECT
      us.id,
      us.nombre
    FROM usuarios us
    WHERE
      id = '$user_check'
  ";
  $ses_sql = mysqli_query($mysqli,$query);
  $row = mysqli_fetch_array($ses_sql,MYSQLI_ASSOC);
  $login_session = $row['nombre'];

  if(!isset($row['id'])){
    header("location:".$dir);
  }

?>
