title: Calling JavaScript with PHP
body: <p>I want to call a PHP function when pressing on a button, sort of like:</p>
  
  <pre><code>&lt;?php 
  function output(){
    // do something
  }
  ?&gt;
  
  &lt;input type="button" value="Enter" onclick="output()"/&gt;
  </code></pre>
  
  <p>I tried to make something like:</p>
  
  <pre><code>&lt;input type="button" value="Enter" onclick="test.php?execute=1"/&gt;
  </code></pre>
  
  <p>where test.php is current page and then by php </p>
  
  <pre><code>&lt;? if(isset(&amp;execute)){ echo "Hello"; } ?&gt;
  </code></pre>
  
  <p>but it doesn't work. </p>