Erro no PHP ao linkar ao banco
Deu esse erro aqui
mysqli_select_db() expects parameter 1 to be mysqli, null given in /home/u537153510/public_html/Testes/index.php on line 7
E aqui meu código
?php
$host = "mysql.hostinger.com.br";
$user = "u537153510_senac";
$pass = "semsenha17";
$banco = "u537153510_video";
mysqli_connect($host, $user, $pass) or die(mysql_error(connection));
mysqli_select_db($link, $banco) or die(mysql_error());
require_once "config.php";
?>
mysqli_select_db() expects parameter 1 to be mysqli, null given in /home/u537153510/public_html/Testes/index.php on line 7
E aqui meu código
?php
$host = "mysql.hostinger.com.br";
$user = "u537153510_senac";
$pass = "semsenha17";
$banco = "u537153510_video";
mysqli_connect($host, $user, $pass) or die(mysql_error(connection));
mysqli_select_db($link, $banco) or die(mysql_error());
require_once "config.php";
?>
comentários (0)
suspender
Lista de Respostas:
Nenhuma resposta foi publicada ainda.