title: Click checkbox save to database
body: <p>GoodDay Masters!</p>
  
  <p>I have a survey webpage answerable by YES or NO (CheckBox). </p>
  
  <p>I want to count surveys by clicking CheckBox and save it into the database.
  this is my codes...</p>
  
  <pre><code>  &lt;label&gt; Did you find this helpful? &lt;/label&gt;
      &lt;input type="radio" name="question" value="yes"&gt;YES&lt;/input&gt;
      &lt;input type="radio" name="question" value="no"&gt;NO&lt;/input&gt;
      &lt;?php 
      $fieldname = $_GET['question'];
      if($fieldname == 'YES' ){
          mssql_query("update TBL_SURVEY SET YES = YES + 1 WHERE adddate = (SELECT max(adddate) FROM TBL_SURVEY)");
      }else{
          mssql_query("update TBL_SURVEY SET NO = NO + 1 WHERE adddate = (SELECT max(adddate) FROM TBL_SURVEY)");
      }
  ?&gt;
  </code></pre>
  
  <p>However I encounter error "Notice: Undefined index: question"</p>
  
  <p>Should I use javascript or ajax? or I just mixed my codings? so what is wrong on my codes?</p>
  
  <p>How can I trigger this code to update my database??</p>