title: how to update table by clicking a link in php
body: <p>I have a project where I create a point system for students. A student may look at the solutions to a question, but if they do, they should lose 2 pts and their profile should also updated with new point score. Is it possible to update a table by clicking on a link? I attempted to do the following: </p>
  
  <pre><code>if($points &gt;0)
  {
      if(($status== '') || ($newuniq_id!= $uniq_id) || ($newquestion_id!= $quid))
      {   
          $query = "insert into status(uniq_id, user_id, user_name, question_id, status) values('$uniq_id', '$id','$name','$quid','read')";
          mysql_query($query);
  
          $newpoints = $points - $cut_points;
          $newquery1 = "update $tabl_u set points = '$newpoints' where uniq = '$uniq1'";
          $newquer2 = mysql_query($newquery1);
      }
  }
  </code></pre>