How to call php function from button?
<p>I've got an easy php script :</p>

<pre><code>&lt;?php
    $command = "git pull";
    $output = shell_exec($command);
    echo "&lt;pre&gt;$output&lt;/pre&gt;";
?&gt;
</code></pre>

<p>And I want to call it by pressing button : </p>

<pre><code>&lt;form metod="post" action="/pull.php"&gt;
   &lt;button type="submit"&gt;Pull changes&lt;/button&gt;
&lt;/form&gt;
</code></pre>

<p>And I want to get output right under the button or replace button with output but I don't want to go to /pull.php I just want to run script and get output. How can I make it ?</p>
