I am new in PHP. I have got one API which have most of functions like below
function getUserByEmail($conn,$email)
{
$user = $conn->prepare("SELECT * FROM table_users WHERE email = ?");
$user->bind_param("s", $email);
$user->execute();
$result = $user->get_result();
$data = $result->fetch_assoc();
$user->close();
return $data;
}
Its working fine in one of my hosting with namecheap which have nd_mysqli
enabled. But in my hostgator hosting, its giving error.
Uncaught Error: Call to undefined method mysqli_stmt::get_result() in
I am unable to enable that extension in Hostgator so I want replace it with answers written here or other way.
But I am not getting idea how I can do it.