title: Activating php on javascript with keypress
body: <p>i want to activate my php code with the use of an assigned key which is "q"
  is it possible to send php code by a keypress?</p>
  
  <p>here is my code:</p>
  
  <pre><code>&lt;?php 
      $name = "soma";
  ?&gt;
  
  &lt;script&gt;
      document.onkeydown = function(evt) {
          var keyCode = evt ? (evt.which ? evt.which : evt.keyCode) : event.keyCode;
          if (keyCode == 81) {
  
              //i want to put my php code here
              // &lt;?php $sql = mysqli_query("INSERT INTO tb_x (`name`)VALUES('$name')");
  
          }
      }
  
  &lt;/script&gt;
  </code></pre>