Ok, I will try to explain myself as clearly as possible
please let me know if I need to be more so.

On my admin page I have a review form. there is a select
box that is self populating from a readir. that part works
fine. however I would like for the files to not show up if
they have been used in a prior review, the ones that have been
used are noted in the MySQL review database. here is the
code that I am trying to work with, if anyone has any ideas,
please let me know.

<snip>
<?php

$handle=opendir('/home/upstarter/public_html/images/albums/');
while (false!==($file = readdir($handle)))
{
         // new code here
         $cExt = explode( ".", $file );
         // and here
                 while($myrow =  mysql_fetch_array($result))
                 {
                        $image_url = $myrow["image_url"];
                        $image = explode( "/", $image_url );

         if ($file != "." && $file != ".." && $file != $image[2] && $cExt[1]
== "gif" || $cExt[1] == "jpg")
                 {
                        echo "<option value=\"$file\">".$file."</option>";
         }
        }
}
     echo "</select>";
closedir($handle);

?>
</snip>

Jerry Lake
Interface Engineering Technician


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to