You didn't really ask a question, what is it you need help doing? The code in your fiddle is working as you described it, the only thing missing is the posting of the selections to your php page - I'll assume that that is what you need the help with.
First though, what is a pr element? You have the numbers being clicked within a <pr> element and, as far as I know, there is no such element. Did you mean <pre>?
The first thing to do would be to store the selections in a hidden variable that can be sent to your php page. Then instead of writing the values to the 'counter' div you would store them in the hidden element.
- <input type="hidden" name="counter" id="counter" />
Then in your click handlers, change the html to val, liek this:
- $('#counter').val(function(i, val) { ....
When the entries get posted what happens? Should the user stay on the same page or will they be sent to another page? The answer to that will determine how you post the answers. If they are stayign on the same page your getting some content back from the php page then you'll want to use ajax (
http://api.jquery.com/category/ajax/ ) to post the data to the server, probably the post method,
http://api.jquery.com/jQuery.post/ .
If they are going to a new page after the data is posted and processed then you can use a normal form and submit it. Make sure the hidden element is within the form and that the action of the form is your php pge and you should be all set.
Hope that was what you needed.
Dave