hello I need to know how to convert this code to mysqli_connect
php
$link = mysql_connect('localhost','root','');
if(!$link){
echo 'No se puede establecer conexion con el servidor: '. mysql_error();
}else{
$base = mysql_select_db('proveedores',$link);
if(!$base){
echo 'no se encontro la base de datos: '.mysql_error();
}else{
$sql = "SELECT * FROM proveedores";
$ejecuta_sentencia = mysql_query($sql);
if(!$ejecuta_sentencia){
echo'hay un error en la sentencia de sql: '.$sql;
}else{
$lista_paises = mysql_fetch_array($ejecuta_sentencia);
}
}
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>contenido pedidos</title>
</head>
<body>
<h1>Pedidos</h1>
<table>
<tr>
<th>fecha</th>
<th>hora</th>
<?php
for($i=0; $i<$lista_paises; $i++){
echo"<tr>";
echo"<td>";
echo$lista_paises['fecha'];
echo"</td>";
echo"<td>";
echo$lista_paises['hora'];
echo"</td>";
echo"</tr>";
$lista_paises = mysql_fetch_array($ejecuta_sentencia);
}
?>
</tr>
</table>
</body>
</html>