I have a form which ultimately I would like to calculate a percentage score from the values submitted. The issue I have is that some answers may be marked as n/a, so I need to be able to calculate only the total number of fields with data ( 0 for a fail, 1 for a pass). I have used an empty string for n/a answers as in the code below. I'm new to php, so was wondering what the best way to go about this is. Is there a way to count the number of empty strings submitted, or perhaps count only the total number of strings submitted which contain data?
<label>
<input type="radio" name="item1" value="">N/A
</label>
<label>
<input type="radio" name="item1" value="0">Fail
</label>
<label>
<input type="radio" name="item1" value="1">Pass
</label>