adding the new php files for writing to the database with an example