$image = "Not valid for displaying - <a href=\"" . $row['image'] . "\">Link</a>";
maybe this way, but sth the original error occurs some lines above
a word to the other thing: the OR would probably work, but not as expected
PHP takes everything except 0, false, "" as FALSE, so ".jpg" would be TRUE
hence, if ($var == "bla" || "bla2" || "bla3") ... would be ALWAYS TRUE
my suggestion:
$end = substr($path,strlen($path)-4,4);
if (($end == '.jpg') || ($end == '.png') || ($end == '.gif')) echo "ok";
btw. the substr thingie gets the last 4 letters, so the 'angelfire' comparison doesn't work