I've basically been researching this Uncaught Error: Call to a member function bind_param() on bool error I've been getting for the last 2 hours with nothing.
$post_data = json_decode(file_get_contents("php://input"));
$encoded_publisher = base64_encode($post_data->publisher);
$encoded_notes = base64_encode($post_data->notes);
$rellevel = $post_data->releaselevel;
$uid = $post_data->uid;
$request = $db->prepare('UPDATE release_history SET author = ?, notes = ?, release_state = ? WHERE uid = ?');
$request->bind_param('ssss', $encoded_publisher, $encoded_notes, $rellevel, $uid);
All these fields are checked at the start of the script if they're empty and they all have data, I've also checked if the data is valid and it is
I've tried changing the MySQL statement, changed the variable names, changed the parameter values like ssss -> ssssssss, I've tagged out every line except the prepare and bind_param lines and its the same error, I've also run the code on the MySQL server and it works perfectly fine
The script should simply update the database entry but it just gives an error