title: Attendance System marking student present/absent checkboxes, update Mysql PHP
body: <p>Scenario: I am making an attendance system for a college, however I have been stuck on updating mysql and using checkboxes to mark a student absent or present. </p>
  
  <p>So currently I have managed to filter the data I want to be shown. this is student_id, fname, lname, present. Please see the code below</p>
  
  <pre><code>&lt;strong&gt;Class Register:&lt;/strong&gt; &lt;/br&gt;
  
  &lt;?php
  
  $test3= "SELECT * FROM course_attendance, students, courses, attendance WHERE course_attendance.course_id=courses.course_id AND course_attendance.week_id=attendance.week_number_id AND course_attendance.student_id= students.student_id AND courses.course_id='101' AND attendance.week_number_id='2' ";
  $result = mysql_query($test3)  or die(mysql_error());
  
  
  echo "&lt;/br&gt;&lt;table border='1' align='center'&gt;&lt;tr&gt; &lt;th&gt;&lt;strong&gt;Student ID&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;First Name &lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Last Name&lt;/strong&gt;&lt;/th&gt; &lt;th&gt;&lt;strong&gt;Present&lt;/strong&gt;&lt;/th&gt; &lt;/tr&gt; ";
  
  while($rows=mysql_fetch_array($result)){
  
      echo "&lt;tr&gt;&lt;td width='100' align='center'&gt;" .$rows['student_id'].
  "&lt;/td&gt;&lt;td width='120' align='center'&gt;" .$rows['fname'].
  "&lt;/td&gt;&lt;td width='120' align='center'&gt;" .$rows['lname'].
  "&lt;/td&gt;&lt;td width='120' align='center'&gt;" .$rows['present'].  
  "&lt;/td&gt;&lt;tr width='120' align='center'&gt;";
  }
  echo "&lt;/table&gt;";
  ?&gt;
  </code></pre>
  
  <p>So currently, this shows the data: student_id, fname, lname, present. </p>
  
  <p>The field 'Present' in my MySQL is a unsigned tinyint, I want to be able to make this a checkbox, which would enable the user to either mark a student present or absent and then update to mysql. Also I dont want the students id, fname and lname enabled to be edited, just the present field.  Is this possible?</p>
  
  <p>Thanks in advance if someone succesfully helps me , I will be forever grateful!</p>