I will provide 4 php files (main script, class definition file, db_connect file) and a mySQL database file (see attached). The php script is designed to handle interactions with the db in response to GET requests generated by a game web site. When successful, it should return an XML dump of the game objects. Classes are defined for Games, Players, etc. Total lines of code ~200 (exclusive of tabbed brace brackets and empty lines).
While there are no clear php errors evident in a php editor, as written, the script does not function. Requirements:
1. Debug the script so that it provides the required XML stream.
2. Add escaping to protect against SQL intrusion.
3. Add error handling where appropriate.