Сообщение об ошибке mysqli_fetch_array() ожидает, что параметр 1 будет mysqli_result
<pre><?php session_start(); $con= mysqli_connect("localhost","root","","phplogin1"); $email = $_POST['email']; $password = $_POST['password']; $sql="SELECT * FROM 'accounts' where email='$email' and password ='$password'"; $result=mysqli_query($con,$sql); $row = mysqli_fetch_array($result); if ($row) { header("location:home.php"); $_SESSION['email'] = $_POST['email']; $_SESSION['loggedin'] = TRUE; } else { echo"Invalid"; //header ("refresh:2;url=login.php"); } ?>
Что я уже пробовал:
It is a very simple login page to for my application. I will develop the secure version later on. I having the error mysqli_fetch_array() expects parameter 1 to be mysqli_result when the user enter the correct email and password. The database will have the column username,password,email,image,address