Multiple checkboxes to variable logic : <p>I am looking to create a simple page using HTML and (probably) PHP or JQuery. The page should allow for multiple checkbox selection, and give a variable a value based on which boxes are checked. This can be on submit or can render live on the page. </p>

<p>i.e.
<br>Checkbox 1 
<br>Checkbox 2
<br>Checkbox 3</p>

<p>If checkbox 1 is checked, variable = X
<br>If checkbox 1 &amp; 2 are checked, variable = Y
<br>If no checkboxes are checked, variable = Z</p>

<p>What is the best way to approach doing this?</p>
