Need to get selected radio button value stored in a variable and I am not sure how to go about it
<input type="radio" name="spilldeck" class="happy" id="happy" value="0" checked />
<input type="radio" name="spilldeck" class="neutral" id="neutral" value="1" />
<input type="radio" name="spilldeck" class="sad" id="sad" value="2" />
I think I can listen to which radio button has been clicked by adding onchange event
<input type="radio" name="spilldeck" class="happy" id="happy" value="0" onChange="getValue(this)" checked />
<input type="radio" name="spilldeck" class="neutral" id="neutral" value="1" onChange="getValue(this)" />
<input type="radio" name="spilldeck" class="sad" id="sad" value="2" onChange="getValue(this)" />
Now I need to store selected value in $spilldeck = ...............