<?php
function conectar(){
    $servidor = "localhost";
    $user = "root";
    $pass = "15103106";
    $bd = "inb";
    $puerto = 3305;

    $conexion = mysqli_connect($servidor, $user, $pass, $bd, $puerto);

    if (!$conexion) {
        die("Error de conexión: " . mysqli_connect_error());
    }
    
    return $conexion;
}
?>