Passing a variable through to another PHP page
<p>I'm making a server manager. I want to add a "kill" command, which would call a php script that would essentially run a shell_exec('kill $arrtext'); and kill the process, thus closing the server down. Here is the part of my script that returns the results and checks to see which servers are running:</p>

<pre><code>&lt;?php
$COMMAND = shell_exec('ps -o command ax | grep skulltag | grep -v grep');
$old = array("skulltag-server", "-port", "-iwad", "-wad", "+exec");
$new   = array("SKULLTAG", "Running on Port", "Using IWAD", "+ PWAD", "with Config");
$COMMAND = str_replace($old, $new, $COMMAND);
$arr = explode("./",$COMMAND);
$text = shell_exec('pgrep -u doom');
$arrtext = preg_split('/\s+/', $text);
 for( $i = 1; $i &lt; count($arr); $i++ ) {
    echo '&lt;div class = "serverborder"&gt;';
    echo '&lt;div class = "servertextalign"&gt;';
    echo $i,'. PROCESS ID &lt;span style="color: #f00;"&gt;',$arrtext[$i],'&lt;/span&gt; with server parameters: &lt;span style="color: #777;"&gt;',$arr[$i],'&lt;/span&gt;';
    echo '&lt;/div&gt;';
    echo '&lt;/div&gt;';
    echo '&lt;br&gt;';
 }
?&gt;
</code></pre>

<p>However, I have no idea how I would add a link or something that would set the proper $arrtext[] variable (depending on which one they picked) and pass it to the PHP script that would kill the server.</p>

<p>The live demo can be found at <a href="http://server.oblivionro.net/servers/" rel="nofollow">http://server.oblivionro.net/servers/</a></p>

<p>Thanks!</p>
