I am trying to create an item selection menu, where the user is presented with multiple buttons to pick their choices. I am creating several divs with PHP.
<div id="h1-1"><input type="button" value="h1-1" onclick="recordValue()"></div>
<div id="h1-2"><input type="button" value="h1-2" onclick="recordValue()"></div>
I would like to record all the values of buttons pressed and show these values via Ajax. Then when user is done selecting and presses submit I will insert these into MSSQL database.
- How do I record button values to an array with Javascript?
- How do I then show what was pressed?
- Where could I execute some filtering of the selections (e.g. if h1-1 was pressed i do not want them to be able to select h2-1) ?