mysqli_fetch_all raising undefined function error in PHP 7.3

21 Views Asked by At

I'm trying to get my website working publicly (my host is Namecheap), but I'm having some trouble with my sign-in-page. After I submit my log-in-form 500 Internal Server Error appears. I checked my error logs and found the following error:

PHP Fatal error:  Uncaught Error: Call to undefined function mysqli_fetch_all()

My PHP version is 7.3 and I have mysqlnd on. Here is the line that raises the error:

$user_data = mysqli_fetch_all($query_result, MYSQLI_ASSOC)[0];

$query result is the value of this expression:

mysqli_query($conn, "SELECT * FROM `users` WHERE `email` = '$email';");

The website works flawlessly locally using XAMPP.

0

There are 0 best solutions below