Helly社区!
我的PHP代码有一个小问题
<?php session_start();
$username = htmlentities($_POST['username']);
$password = htmlentities($_POST['password']);
//require_once('connection.php');
$connection = mysqli_connect("localhost","root", "", "logins");
$query = "SELECT * FROM logins WHERE username = '".$username."'";
$q = mysqli_query($connection,$query);
$queryResult = mysqli_fetch_assoc($q);
if(shal($password)) == $queryResult['password']{
$_SESSION['username'] = $username;
header("Location:chat.php");
}
?>
错误消息是
解析错误:语法错误,第13行的C:\ xampp \ htdocs \ abschlussarbeit \ login.php中出现意外的'=='(T_IS_EQUAL)
如果您能帮助我,那将非常好! :D