jaronblake Posted August 11, 2006 Share Posted August 11, 2006 What I'm trying to do is setup in mysql row to have a picture name to go with my item. example: name: cup; picture:cup.jpgThis works fine when in php i try to pull up the picture when i pull up the item as long as i have my picture stored in the folder.But, what i want to do is if the picture is not in the folder or i have not spelled something correctly then i want it to default to a defaut picture. Is there some way to do this? Link to comment https://forums.phpfreaks.com/topic/17299-picture-not-found/ Share on other sites More sharing options...
akitchin Posted August 11, 2006 Share Posted August 11, 2006 file_exists() can tell you whether the file is there or not. use a simple if-else statement to show either the photo or the default image based on the results of the function. Link to comment https://forums.phpfreaks.com/topic/17299-picture-not-found/#findComment-73436 Share on other sites More sharing options...
jaronblake Posted August 11, 2006 Author Share Posted August 11, 2006 thank you very much Link to comment https://forums.phpfreaks.com/topic/17299-picture-not-found/#findComment-73437 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.