When I\'m trying to insert data trough the database its says \"Uncaught Error: Call to private method DbOperations::insertData() from context \'\'\".
My insert data PHP
You are trying to call a private method outside the class, that's not possible, you can read more about methods visibility on the official PHP methods visibility docs.
Class members declared public can be accessed everywhere. Members declared protected can be accessed only within the class itself and by inheriting and parent classes. Members declared as private may only be accessed by the class that defines the member.
You should declare your method as public instead of private if you want to use the method outside the class:
public function insertData($airport, $location, $space , $flight){
... your code
}