Thanks...I did some searching to understand how to use it, from the manuals perspective. There were several good comments in the manual.
Also did a search of phpbuilder and found several different ways to accomplish this.
Here's one I'm that I modified a bit and it works great!
Just before the <form> tag where the form is created I run this script:
if ($handle = opendir('Your hosted server and path to your image files')) {
// echo "Directory handle: $handle\n";
// echo "Files:\n";
// place a blank option in the list
$filelist[] = "";
// Read the folder contents using the handle but don't include
// the .. and the . files since they are pointers to the parent
// and same folder.
while (false !== ($file = readdir($handle))) {
if($file != ".." && $file != ".")
{
$filelist[] = $file;
}
}
// Close the folder handle
closedir($handle);
// After the form tag, I build the selection options
<form action="<?=$PHP_SELF ?>" method=post>
// Build the list of options inside the form itself. The options
// are sorted a..z with a first option being a blank.
<tr><td align=left>
<span class=s1>
Image Filename
</span> </td>
<td align=left>
<select name="selected_dir" >
<?php
asort($filelist);
while (list ($key, $val) = each ($filelist))
{
// echo "<option>$val</option>";
echo "<option value='$val'>$val</option>";
}
?>
</select>
</td>
// After the </form> tag in the Submit section, I place the
// assignment. The variable selected_dir is the image filename in
// the img/ folder of the hosted server:
$selected_dir = "img/$selected_dir";
....
....
IMAGE= '$selected_dir'
// Now the db row/column contains the path and filename. So
// later when a customer searches the table for products, they
// view the associated image with the correct product record.
// It may not be the best code but it certainly works the way I want it to.
I love this site. It has the most technically seasoned people and there's a wealth of creative knowledge available both in the manuals and through posts.
Thanks phpbuilder and members.