I'm not sure if this is the correct place to post this since I think it's more of an html thing.
This is an intranet page for the admins that scans remaining disk space through hidden admin shares. Using the server name and the drive letter I build the command on the page this data is sumitted to and run it via the php exec() function. I want to put in a checkbox next to each server that (when checked) checks all the drives underneath it and also another checkbox at the top of the page that (when checked) checks all the servers.
My problem is I can't find an example of something even similar to this. If anyone could point me in the right direction it would be much appreciated.
<?php
$mode = $_GET['mode'];
IF ($mode == "select"){
print $mode;
print "<form action=\"?mode=scan\" method=\"post\">";
$serverquery = "SELECT svr_name FROM svr";
$serverresult = mssql_query($serverquery);
while(list($server_name) = mssql_fetch_row($serverresult)){
print "<br />".$server_name."<br />";
print "<input type=\"hidden\" name=\"server[]\" value=\"".$server_name."\">";
$server_table = "svr_".ereg_replace("-","",strtolower($server_name));
$drivequery = "SELECT drv_ltr, drv_size FROM $server_table";
$driveresult = mssql_query($drivequery);
while (list($drive_letter, $drive_size) = mssql_fetch_row($driveresult)){
print "<input type=\"checkbox\" name=\"".$server_name."_drive[]\" value=\"".$drive_letter."\" />";
print strtoupper($drive_letter).":\<br />";
}
}
print "<br /><input type=\"submit\" name=\"scan\" value=\"Scan selected\" />";
print "</form>";
}
?>