I am new to PHP
and I am currently studying PDO
, I made a simple structure and have an error that I can not identify. I've seen several examples of people using the same framework and it works.
<?php
$host = "localhost";
$user = "root";
$pass = "";
$dbname = "test";
$conexao = mysqli_connect($host, $user, $pass);
$db = mysql_select_db($conexao, $dbname);
$nome = "exemplo";
$consulta = mysql_query("SELECT * FROM usuarios_teste WHERE nome = $nome ");
?>
The errors I get are:
Fatal error: Uncaught Error: Call to undefined function mysql_select_db ()
Error: Call to undefined function mysql_select_db ()