I have this code:
<?php
require ("../clases/Conexion.php");
session_start();
$host = "localhost:3307";
$user = "root";
$pass = "";
$bd = "nutricion";
$con = mysqli_connect($host,$user,$pass,$bd) or die("Error al conectar al Servidor");
$con = new conexion();
$con->conectar();
if ($_SESSION["correo"]=='') {
//header("Location:../index.php"); exit;
echo "1";
}
$msql_db_query= mysqli_query($bd,"SELECT * FROM tbl_usuario WHERE correo='" . $_SESSION['correo'] . "';") or die ("Error al buscar usuario");
if ($result) {
$id_usuario = mysqli_result($msql_db_query(),0,'id');
$nombre_usuario = mysqli_result($msql_db_query(),0,'nombre') . " " . mysqli_result($msql_db_query(),0,'apellido');
}else {
//header("Location:../index.php"); exit;
echo "2";
}
date_default_timezone_set('America/Mexico_City');
?>
Which generates the following error:
Warning: mysqli_query () expects parameter 1 to be mysqli, object given in C: \ xampp \ htdocs \ admin \ classes \ Access.php on line 17 Error searching for user
I searched the internet for the solution but I can not find it, I wanted to see if anyone could help me by verifying my code. It is assumed that after going through the login should go to another page, before it worked, but now no longer.
Try all the sufferings that were made to me, the ones I found on the internet and nothing works for me, I do not understand why I get that error if I'm really giving you the 2 parameters that you ask me for.