title: Automatic marking
body: <p>Am puzzled about how to make a system that can automatically mark.
  Am using a variable $count in PHP and is the one storing data from the checked radio button.</p>
  
  <p>I have not tried to check on how to do it and am just afraid of how to do it.</p>
  
  <p>I have the following codes which out puts the data in radio buttons</p>
  
  <pre><code>    &lt;?php
  
  $get=mysql_query("select * from courses where courseid='".$cid."'");
  while ($picked=mysql_fetch_array($get)) {
      echo "&lt;b&gt;The questions for ".$picked['coursename']." are:&lt;/b&gt;&lt;br&gt;&lt;br&gt;";
  }
  
  $query=mysql_query("select * from papers where cid='".$cid."'");
  
  if (mysql_num_rows($query)&gt;0) {
      $count=1;
      while ($row=mysql_fetch_array($query)) {
          echo "Qn ".$count.". ".$row['question']."&lt;br&gt;&lt;input type='radio' name='".$count."' value='A'&gt;".$row['A']."&lt;br&gt;&lt;input type='radio' name='".$count."' value='B'&gt;".$row['B']."&lt;br&gt;&lt;input type='radio' name='".$count."' value='C'&gt;".$row['C']."&lt;br&gt;&lt;input type='radio' name='".$count."' value='D'&gt;".$row['D']."&lt;br&gt;&lt;br&gt;";
          $count++;
      }
  }else{
      echo "No papar has been set yet for this paper.";
  }
  
  ?&gt;
  &lt;input type="submit" name="but" value="Submit Assessment"&gt;
  </code></pre>
  
  <p>and it outputs the following:</p>
  
  <p><img src="https://i.stack.imgur.com/mmpJP.png" alt="enter image description here"></p>
  
  <p>And the database is like:</p>
  
  <p><img src="https://i.stack.imgur.com/cpUMA.png" alt="enter image description here"></p>