Help needed.

I have a list of items and prices that I pull from a MySql dtatabase (see image) using php. I would like to be able to select some of these items (maybe hundreds) and calculate the total of only the selected items (by clicking on a check box). See image.

If someone has any ideas, I would be very thankfull.