I was wondering if I could get alittle help in this issue.  I have
extinguished all other resources, with no avail to help.  I am trying to get
a directory listing for a dropdown list to choose for connection to a MySQL
database for the correct image name to be printed into the database.  I have
the database part working perfectly as far as the printing the correct name
from the directory list, although I am only being able to list the first
file in each of the directories.  Not the entire directory.  This is in a
.inc script running with two other scripts a .php script and another .inc
script for the reference to the following.  I was wondering if someone could
give me some insight as to how I could resolve this issue to make the list
actually appear like it is supposed to displaying everything in the list
that has the extension '.jpg', '.JPG', '.gif', '.GIF', '.bmp', '.BMP',
'.jpeg', '.JPEG'.  Although, the only files I really need out of the
directory are going to be '.JPG', '.jpg', '.GIF', '.gif', '.JPEG', '.jpeg'.
some assistance would be greatly appreciated.. the following is the actual
script as I have written it.

/* The Script segment that is needed to be fixed or working
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
*/
if ($dir1 = opendir("../../members_profiles/pics/")) {

while(FALSE !== ($file = readdir($dir1))) {

if ($file != "." && $file != "..") {

$fdd["picture"] = Array(

'name'=>'Picture',

'select'=>'D',

'type'=>'string',

'maxlen'=>130,

'nowrap'=>false,

'values'=>Array($file),

'default'=>'no_image.jpg',

'required'=>true,

'sort'=>true

);

}

}

closedir($dir1);

}

if ($dir2 = opendir("../../members_profiles/crests/")) {

while(FALSE !== ($files = readdir($dir2))) {

if ($files != "." && $files != "..") {

$fdd["crest"] = Array(

'name'=>'Crest',

'select'=>'D',

'type'=>'string',

'maxlen'=>130,

'nowrap'=>false,

'values'=>Array($files),

'default'=>'no_image.jpg',

'required'=>true,

'sort'=>true

);

}

}

closedir($dir2);

}

/*
§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§§
 the web page that this is running on is
http://www.dragonpalace.net/~dfwshinai/members_profiles although, the script
is actually resident in the admin pages of this site. */

Thanks in advance
§§ Duncan MacLeod §§



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to