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? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
jaronblake Posted August 11, 2006 Author Share Posted August 11, 2006 thank you very much Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.