title: Sql query on clicked button
body: <p>I would like to ask how can I call Sql query when HTML button is pressed. I watched a couple tutorials, but never got it to work correct, thats why I would like to ask here.</p>
  
  <p>So..I have a list of items displayed, and the list is generated from database. Here is how the code looks like:</p>
  
  <pre><code>&lt;table width="100%" border="1" cellspacing="1" cellpadding="5" style="background-color:#FFC" &gt;
  &lt;td&gt;Id&lt;/td&gt;
  &lt;td&gt;Text&lt;/td&gt;
  &lt;td&gt;Solved?&lt;/td&gt;
  &lt;td&gt;&lt;/td&gt;
  &lt;?php
  while( $array = mysql_fetch_assoc($queryRun) ) {
      ?&gt;&lt;tr&gt;
      &lt;td&gt;&lt;?php echo $id = $array['id'].'&lt;br /&gt;';?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $text = $array['text'].'&lt;br /&gt;';?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $reseno = $array['solved'].'&lt;br /&gt;';?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;input type="button" value="Solve it" /&gt;&lt;/td&gt;
      &lt;/tr&gt;&lt;?php
  }?&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p>Now each item that is generated inside this loops has a button "Solved" at the end of the table, and I want to make it so when user click on that button, do a Sql query which changes a value of solved from 0 (false) to 1 (true).</p>