From: "Louie Miranda" <[EMAIL PROTECTED]>
im not sure if i coded one of my application wrong, i am displaying an
image by displaying the itemcode and just adding a ".jpg" extension at
the end.

like this..

$itemCode = $row['itemCode'];
..
<img src=/images/$itemCode.jpg>

i assumed before that i can show it all, but i found out that i cannot.

my problem now is the $itemCode is on a database and the image
filename is on  directory.
Will it be possible to detect a image file it exist or not?

I'm not really following what you're asking for...

If you're asking if you can just detect if an image file exists...

if(file_exists("images/{$itemCode}.jpg"))
{ echo "<img src=\"images/{$itemCode}.jpg\">"; }
else
{ echo "No image"; }

---John Holmes...

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



Reply via email to