i used to use functions like this one:
function data_user($dbc,$email){
$q = "SELECT * FROM doctors WHERE email= ?";
$stmt = mysqli_prepare($dbc, $q);
mysqli_stmt_bind_param($stmt, "s", $email);
mysqli_stmt_execute($stmt);
$r = mysqli_stmt_get_result($stmt);
return $r
}
and then i call them inside my html code like this:
$r = data_user($dbc,$email);
while($info = mysqli_fetch_assoc($r){
echo $info['user_name'];
}
it was working absolutely fine on my old server but then i moved my website to a new server which does not support mysqlnd so my website shows an error says that mysqli_stmt_get_result is undefined function, I have contacted my host support service and the said there is no way to install mysqlnd on the server so i need to change my code, I have tried many other solutions but none of them actually works as i want, any help is appreciated..