I am having the error as defined in the title with the code below.
[php]<?php
include("…/database/config.php"); //config file for the database
$user = $_POST[‘user’];
$pass = $_POST[‘pass’];
$check = (“SELECT * FROM accounts WHERE user=’.$user.’ AND pass=’.$pass’”);
$rows = mysqli_num_rows($query);
if($rows !=0)
{
while ($row = mysqli_fetch_assoc($query))
{
$checkuser = $row['username'];
$checkpass = $row['password'];
}
if ($user == $checkuser && $pass == $checkpass)
{
session_start();
$_SESSION['sess_user']=$user;
header("Location:../")
}
else
{
echo"The username or password you used was incorrect. Please go back and try again!";
}
}
?>[/php]