I want to show a table but at the moment of showing it I get entangled I need help to show it and I can connect but not import it
this is the code to connect me:
<?php
function conectarse (){
$link = mysqli_connect("localhost", "root", "*********") or die("No se pudo conectar: " . mysql_error());
if (!$link) {
echo "Error: No se pudo conectar a MySQL." . PHP_EOL;
echo "errno de depuración: " . mysqli_connect_errno() . PHP_EOL;
echo "error de depuración: " . mysqli_connect_error() . PHP_EOL;
exit;
}
if(!mysqli_select_db($link,"precioproductos")){
echo "Error: No se pudo conectar con la base de datos." . PHP_EOL;
exit;
}
return $link;
}
?>