Here is the form data...
<form action="index.php" method="post">
<input name="mode" type="hidden" value="buildTreeDir" />
<input type="submit" value="Compile Filesystem List" />
</form>
...and here is the PHP code...
require("lib/db.inc.php");
...
function buildTreeDir() {
if (!($connection = @ mysql_connect($sqlhost,$sqluser,$sqlpw))) // initial database connect
showerror();
if (!mysql_select_db($sqldb,$connection))
showerror();
$sqlquery = 'SELECT `cur_title` FROM `mw3_cur` WHERE `cur_title` LIKE \'%/usr/BOSS%\' ORDER BY `cur_title`';
if (!($sqlresult = @ mysql_query($sqlquery,$connection))) {
showerror();
} else {
$inc = 0;
while ($row = @ mysql_fetch_array($sqlresult)) {
$files[$inc] = $row['cur_title'];
$inc++;
logMsg($files[$inc]);
}
}
}