I have hosted my site on GoDaddy server. It was working fine from last 2 years but suddenly I started getting error while login:
PHP Fatal error: Call to undefined method mysqli_stmt::get_result()
This is my login code snippet:
$unsafe_username = $_POST["username"];
$unsafe_password = md5($_POST["password"]);
$query = "select user_id from users where user_name= ? and password= ?";
$getdata=mysqli_prepare($con, $query);
$getdata->bind_param("ss", $unsafe_username, $unsafe_password);
$getdata->execute();
$getdata = $getdata->get_result();
$getdata = mysqli_fetch_assoc($getdata);
I am getting error in following line:
$getdata = $getdata->get_result();
This code was working for last 2 years but I started getting the above mentioned error from last 2 days. I call GoDaddy so many times, but they every time say that this is a coding issue.
I have no idea what to do now? Can anybody please help me out. I am clueless and frustrated.