This was a frustrating project for me. I used a web resource to develop the assessments at the end of each lesson. This web template effectively executes quizzes and secures the answer key by separating the student access by calling an HTML file which then executes a function in a linked .js file to render the assessment.
This dual file format is helpful in securing the key, but it presented me difficulties in trying to grab the variables that were created in the rendering script. Peter helped me with some PHP and JQuery code and we were able to write to the database using the variables named in the files. I am still trying to use this code to actually collect the variables in the live files but have more work to do to be successful.