Posts: 805
Name: Will Craig
Location: Cheltenham, Gloucestershire, UK
|
I have a script where i upload files and then they are printed in a dropdown menu for me to add them to db; along with other information.
The code to print dropdown menu is as follows:
PHP Code:
<?php
$dir = opendir('../images/upload');
while(false !== ($file = readdir($dir))){
if($file != "." && $file != ".." && $file != "Thumbs.db"){
echo '<option value="'.$file.'">'.$file.'</option>';
}
}
closedir($dir);
?>
Any chance of an if statement that will check if $file is in field (location), in table (games), in any record before printing
PHP Code:
<option value="'.$file.'">'.$file.'</option>
?
|