0
I am trying to make a bank consultation for access release. When I make the following query:
<?php
if(isset($_POST['Login'])){
$user = $_POST['user'];
$password = $_POST['pass'];
$sql = MySql::conectar()->prepare("SELECT * FROM `tb_admin.usuarios` WHERE user = ? AND pass = ?");
$sql->execute(array($user,$password));
if($sql->rowCount() == 1){
$_SESSION['login'] = true;
header('Location: '.PATH);
}else{
echo '<script> alert("Nome de Usuário ou senha incorreto!"); </script>';
}
}
?>
The browser shows me the following error:
Column not found: 1054 Unknown column 'pass' in 'Where clause
How can I solve?
error says there is no column
pass
on the tableusuarios
on the benchtb_admin
– rLinhares
Thank you very much, solved here
– Cesar4ugusto