I'm trying to make a login system between PHP and SQL Server and is giving the resource (7) of type (SQL Server Statement) error.
index.php
<form class="form-horizontal" id="FormLogin" action="login.php" method="post">
<div class="form-group">
<label for="login">Login</label>
<input type="text" class="form-control" id="login" name="login" placeholder="Entre com o seu Login">
</div>
<div class="form-group">
<label for="senha">Senha</label>
<input type="password" class="form-control" id="senha" name="senha" placeholder="Entre com a sua Senha">
</div>
<button type="reset" class="btn btn-default">Limpar</button>
<button type="submit" class="btn btn-danger pull-right">Entrar</button>
</form>
login.php
<?php
include 'conexao.php';
include 'banco-usuario.php';
$usuario = buscaUsuario($conn, filter_input(INPUT_POST, 'login'), filter_input(INPUT_POST, 'senha'));
var_dump($usuario);
bank-user.php
$query = "select * from usuario where login = '{$login}' and senha = '{$senha}'";
//$resultado = mysqli_query($conn, $query); //MySQLi
$resultado = sqlsrv_query($conn, $query); //SQL Server
return $resultado;
}
I do not know what to do to resolve this. I want to make a system that uses login.