 <p>In your form, you want PHP to treat your input as an array, so change your HTML like so-> add [] after the name. </p> <pre><code>&lt;input name="price[]" type="checkbox" value="" /&gt; </code></pre> <p>Then in PHP just access the form variable name like you normally would and loop through the values and sum them. </p>