I am try to get a script to detect all the files in a directory, however it only shows the first file in the directory, how can I make so it detects all the files?
This is part of an entire script, but the rest is fine and has no realtion to this.
Here's what I've done:
Any Help is greatly appreciated
This is part of an entire script, but the rest is fine and has no realtion to this.
Here's what I've done:
PHP:
} elseif ($_GET[p] =="4") {
$contentform = '<FORM method="POST" action="index.php?p=sigout">
<strong>Signature Template:</strong><br>
<select name=image>';
$handle2 = opendir('templates');
while (false !== ($image = readdir($handle2))) {
$image = str_replace('.', '' ,$image);
$image = str_replace('png', '' ,$image);
$image = str_replace('indexphp', '', $image);
$image = str_replace('Thumbsdb', '', $image);
if ($image != '') {
$contentform3 = '<option value="'.$image.'.png">'.$image.'</option>';
}
}
closedir($handle2);
$contentform2 = '</select>
<br>
<P><strong>Font:</strong><br>
<select name=font>';
$handle = opendir('fonts');
while (false !== ($font = readdir($handle))) {
$font = str_replace('.', '' ,$font);
$font = str_replace('ttf', '' ,$font);
$font = str_replace('TTF', '' ,$font);
$font = str_replace('indexphp', '', $font);
$font = str_replace('Thumbsdb', '', $font);
if ($font != '') {
$contentform6 = '<option value="'.$font.'.TTF">'.$font.'</option>';
}
}
closedir($handle);
$contentform5 = $contentform6.'</select><br>
<P><strong>Text Line 1:</strong><br>
<input type="text" name="string" size=35><br>
<P><strong>Text Line 2:</strong><br>
<input type="text" name="string2" size=35>
<P><input type="submit" name="submit" value="Create Image!">
</FORM><br>';
$page->replace_tags(array(
"{content}" => $contentform.$contentform3.$contentform2.$contentform5
));
Any Help is greatly appreciated








