Mysqli_query() expects parameter 1 to be mysqli


#1

$user=“id4147701_vitor”;
$password="*******";
$database=“id4147701_testando”;
$hostname=“localhost”;

$con = mysqli_connect($hostname,$user,$password,$database);

$nome = $_POST[‘nome’];
$email = $_POST[‘email’];
$duvida = $_POST[‘duvida’];

$query = “SELECT duvida FROM perguntas WHERE duvida = ‘$duvida’”;
$select = mysqli_query($query, $con) or die(mysqli_error($con));
$array = mysqli_fetch_array($select);
$lgarray = $array[‘duvida’];


#2

I told you earlier that the order connection/query should not be query/connection! :slight_smile: