title: How to change SQl value with a button click on PHP
body: <p>Don't know how much code is actually needed so let me know!</p>
  <p>I have this project I'm developing and I'm doing the admin-end on PHP. It uses SQL and the admin can pretty much update, remove and promote to administrator normal users(what I can't do).</p>
  <p>SQL</p>
  <pre><code> CREATE TABLE User (
      UserID int NOT NULL,
      Username varchar(50) NOT NULL,
      Email varchar(255) NOT NULL,
      Password varchar(255) NOT NULL,
      Image varchar(255) NOT NULL,
      Type varchar(255) NOT NULL
  )ENGINE=InnoDB DEFAULT CHARSET=latin1;
  </code></pre>
  <p>The field <code>type</code> is either admin/user. What I want to do is on a button click I change the value from <code>user</code> to <code>admin</code>.</p>
  <p>I was thinking of using the <code>onclick</code> JS function but I have no idea how this can be achieved. Like follows:</p>
  <pre><code>&lt;a onclick='.$row[&quot;Tipo&quot;].'= admin&quot; class=&quot;btn btn-promote&quot;&gt;Promote&lt;/a&gt;
  </code></pre>
  <p>Thanks for the read, any help is welcome!</p>