title: Add points to database when user adds a topic
body: <p>A user can add a topic by filling in a form.</p>
  
  <p><strong>What i want:</strong> 
  The row "punten(points)" in my database to update the score. so if the score was 10. it adds up another 10 points.</p>
  
  <p><strong>My function:</strong></p>
  
  <pre><code>public function update_points($tabel, $query){
      $q = '';
      foreach ($query as $key =&gt; $value) {
          $value  = str_replace("'","&amp;#39;",$value);
          $q .= "`".$key."` = '".$value."',";
      }
  
      if(isset($q) &amp;&amp; ($q !='')) {
          $q = substr($q,0,-1);
          $this-&gt;database-&gt;query("UPDATE ".$tabel." SET punten = punten + ".$q." LIMIT 1");
          $this-&gt;database-&gt;execute();
      }   
  }
  </code></pre>
  
  <p><strong>Html file:</strong></p>
  
  <pre><code>if(isset($_POST['react_btn'])){                              
  $query['punten'] = 10;
  $app-&gt;update_points('klanten', $_SESSION['klant_id'], $query);
  </code></pre>