-1
The error of my code is in the Connection to the database, is the following:
mysqli_select_db() expects Exactly 2 Parameters, 1 Given
<?php
$servidor='localhost';
$banco='isartes';
$usuario='root';
$senha='';
$conexao=mysqli_connect($servidor,$usuario,$senha);
if(!($conexao)){
echo "Conexao Falhada"; exit;
}
$selecao = mysqli_select_db($conexao);
if(!($selecao)){
echo "Base de dados nao achada";
exit;
}
?>
Missed passing the connection to the function. My suggestion is not to use it, and pass the bank name as the fourth argument of
mysqli_connect()
– rray
The Code trex is just below! <? php $server='localhost'; $bank='isartes'; $user='root'; $password='; $connection=mysqli_connect($server,$user,$password); if(!($connected)){ echo "Failed Connection"; Exit; } $selection= mysqli_select_db($connection); if(!($selection)){ echo "Database not found"; Exit; } ?>
– Setimo Muteca Jr.