began work on backend process.php. realized a multi-dimensional array would be very useful (first part is element id, second is question's attributes). converted code in script.js to make the  generate a multidimensional array.