mental test save to array and submission

whenever a question is answered it saves to an array, this array then
has a submit function which can be used to send the array to the
database