I am using the below to sent ssh commands through a web interface. Below is an example to get the hostname of a Linux computer.
I need to change this form, from a dropdown menu, to checkboxes. I know how to do this in html, but I don’t know how to tell php to handle it. Reason is, what if multiple checkboxes are selected? how would target=“main” display results from multiple computers?
index.html
[code]
Select Client
Client001
Client002
Client003
hostname.php
[code] <?php
include(‘Net/SSH2.php’);
include(‘variables.php’);
$ip = $_GET[‘clients’];
$ssh = new Net_SSH2($ip);
if (!$ssh->login($user, $pass)) {exit(‘Login Failed’);}
echo $ssh->exec(‘hostname’);
?>[/code]