title: Run a PHP function upon button click?
body: <p>I want to run a PHP function with an HTML button click.  </p>
  
  <p>I can call a PHP script this way:</p>
  
  <pre><code>&lt;form action="action.php" method="post"&gt;
    Name: &lt;input type="text" name="txt"/&gt;
    &lt;input type="submit" /&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>But I don't want to invoke "action.php".  I just want to call the PHP function I defined in this page.  Can this be done?</p>