I use the following code to put directories that are on the server but not in the database yet on my website, so I can use a function to have them added.
However, when all my directories are in the database I get just an empty page, I want to put in a nice line that says all dirs are already added.
I don't know why the following code doesn't do just that. I tried several other things, no luck yet.
Do you have any idea what goes wrong, or how to solve this?
if ((!in_array($linktext,$foundsets)) && (!in_array($filesexist,$scanned_dirs))) {
if ((count($images_found) > 0) || (count($movies_found) > 0)) {
if ($movie == "image"){
echo "<tr><td>Add to database</td></tr>";
}else if ($movie == "movie") {
echo "<tr><td>Add to database</td></tr>";
}
}
}
// this is the extra code to display the text for empty results, it doesn't work //
else {
if ((count($images_found) == 0) || (count($movies_found) == 0)) {
if ($movie == "image"){echo"No more image directories to be added";exit;}
if ($movie == "movie"){echo"No more movie directories to be added";exit;}
}
}
// end extra line //