You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<?phpheader("Content-Type: application/json");require_once 'db.php';//Get the all response from$response = array();//Provide Movie Idif (isset($_POST['id'])){ // Move On And Delete Movie $id = $_POST['id']; $statment = $connection->prepare("DELETE FROMmovies WHERE id = '$id' LIMIT 1"); $statment->bind_param('int', $id);if ($statment->execute()){ // SUCCESS $response['error'] =false; $response['message'] = "Movie was successfully Delete"; }else{ // Failed $response['error'] =false; $response['message'] = "Movie Failed ToDelete"; } }else{ // We dont have any delete id $response['error'] =true; $response['message'] = "Please Provide Us With Id";}echo json_encode($response);