-2
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>";
}
}
?>
Error: Function name must be a string in login.php (11). That’s what’s wrong. Look at line 11 of the file
login.php
and tell me what you did...– Woss
It is not to say what is wrong. We realized that you did not identify, otherwise you would not have created the question. It’s to explain what you did on this line.
– Woss