Call PHP on server via Javascript?
<p>I am attempting to make a dead simple webpage that does things when I click a button.</p>

<p>I am trying to use Javascript so I don't have to reload the main page or anything.</p>

<p>So I want a button that says "Shutdown", and I simply want to run shutDown.php that will shut down the server when I click on this.</p>

<p>I've been searching for an hour now and can't find a simple example. Could someone please post a very simple, example, or a link to one? </p>

<p>Many thanks :)</p>

<p>EDIT:
Okay so here's my pitiful attempt.. it doesn't work.. any tips?</p>

<pre><code>&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Control Page&lt;/title&gt;
&lt;/head&gt;

&lt;body&gt;

&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js" type="text/javascript"&gt;
/*************************************
JQUERY EXAMPLE
*************************************/
$('#mysubmit').click(){
    var jqueryXHR = $.ajax({
        'type': 'POST',
        'url': 'http://localhost/killIE.php',
        'dataType': 'json'
       });
    }
}
&lt;/script&gt;

&lt;input type="submit" name="mysubmit" value="Click!" /&gt;


&lt;/body&gt;
&lt;/html&gt;
</code></pre>
