I am creating a chess website. This site will have a MySQL database which will have searchable chess games in PGN format. I was wondering if anyone has an idea of how to change this script in a way that will allow for games in PGN format to be viewed as a variable (as grabbed from the SQL table) rather than parsing them from files. Let me know if I need to be more clear.