title: How to record only int value from html(php) to mysql database table?
body: <p>My question is: How to insert number(int) to countTable when buttons are click?</p>
  
  <p>Here is my sample code, Thank you.</p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form action="check.php" method="POST"&gt;
    &lt;button name="a"&gt;a&lt;/button&gt;
    &lt;button name="b"&gt;b&lt;/button&gt;
    &lt;button name="c"&gt;c&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>check.php</p>
  
  <pre><code>require('connect.php');
  $A = $_POST["a"];
  $B = $_POST["b"];
  $C = $_POST["c"];
  $sql = "INSERT INTO countTable (numA,numB,numC)
  VALUES(:numA,:numB,:numC)";
  $pre = $conn-&gt;prepare($sql);
  
  $pre-&gt;bindValue(':numA',$A);
  $pre-&gt;bindValue(':numB',$B);
  $pre-&gt;bindValue(':numC',$C);
  
  $r = $pre-&gt;execute();
  </code></pre>
  
  <p>mysql countTable</p>
  
  <pre><code>create table countTable (
  id varbinary(64) not null,
  numA int(100),
  numB int(100),
  numC int(100),
  primary key(id)
  ); 
  </code></pre>