Wow, I did it!
Using a combination of suggestions from Jason, Brian and some from "Vacunita" in another PHP forum (would like to give credit for them but not sure if it's allowed), I now have a single page that sees all files in a directory, displays them with check boxes and deletes them if checked. No Record Set or Table required.
Basically I used DFP's delete file behavior but instead of referencing a hidden field, I referenced the checkbox value. And the check box value is assigned dynamically.
I set the form action to "" and post. Then set the trigger for the DFP behavior to "any form post".
Now I just need to figure out how to show ONLY image files. Because, as it is now, all files are showing up and can be deleted.
Here's a generic example of what I did with everyone's help. Thanks again, TroyD
<?php require_once("WA_DigitalFilePro/HelperPHP.php"); ?>
<?php
$WA_DeleteFileResult1 = false;
if($_SERVER["REQUEST_METHOD"] == "POST"){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("images/", "".((isset($_POST["image"]))?$_POST["image"]:"") ."");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
img {
width: 150px;
}
-->
</style>
</head>
<body>
<form action="" method="post" enctype="multipart/form-data">
<?php
$mydir="images/";
if ($handle = opendir($mydir)) {
echo "Images:\n <table><tr><td>Delete</td><td>Filename</td></tr>";
while (false !== ($file = readdir($handle))) {
echo "<tr><td><input type='checkbox' name='image' value='$file'></td><td><img src='$file'></td><td><img src='images/$file' /></td><td>$file</td></tr>";
}
echo "</table>";
closedir($handle);
}?>
<input name="Delete" type="submit" value="Delete" />
</form>
</body>
</html>
One thing to note for anyone still learning like me. When you go to the DFP delete behavior and click on the lightning bolt next to File name:, you won't see the check box as an option. That's because it's not recognized yet by the form since it has to be echoed I think. So I just typed in the name of the check box, in this case "image". Once it's on the server, then the check box becomes a recognized form element. (If that's not correct, please let me know).