Fatal error: Uncaught Error: Function name must be a string in C: \ xampp \ htdocs \ Proj_solos \ php \ login.php: 11 Stack trace: # 0 {main} thrown in C: \ xampp \ htdocs \ Proj_solos \ php \ login.php on line 11
<?php include_once './conexao.php';
$erro= array();
if (isset($_POST['login']) && strlen($_POST['login']) >0 ){
if (!isset($_SESSION))
session_start ();
$_SESSION['login'] = $mysqli ->escape_string($_POST['login']);
$_SESSION['senha'] = md5(md5($_POST['senha']));
$sql_code = "SELECT senha,login FROM usuario ->' $_SESSION[login]'";
$sql_query = $mysqli($sql_code) or die ($mysqli->erro);
$dado= $sql_query -> fetch_assoc();
$total = $sql_query -> num_rows;
if($total ==0){
$erro[] = "Este Usuario não existe.";
}else{
if($dado['senha'] == $_SESSION['senha']){
$_SESSION['login'] = $dado["ID"];
}else{
$erro[]= "senha Incorreta!";
}
}
if (count($erro ==0 || !isset($erro))){
echo "<script>alert('Login efetuado com Sucesso');location.href='../php/index.php';</script>";
}
}
?>