iPixel Posted April 22, 2009 Share Posted April 22, 2009 Here's what i want to do, let me know if it's duable and then i can start figuring out how with some help . I make a variable $idphoto = $firstname . " " . $lastname . ".jpg"; I have images on the server (images/ID) that are generic ID photos male1.jpg female1.jpg. Since upon data insertion through SQL the $idphoto image file is not yet available since the picture ID had most likely not been taken i want to find male1.jpg/female1.jpg and make a copy of that image and rename it into $idphoto. The progress would run something like this : Submit form with info get info check if img file exists with $idphoto name if it does not - make copy of generic image and rename to $idphoto if exists just insert that img name into the database then rest is downhill. Thanks 2 all Quote Link to comment https://forums.phpfreaks.com/topic/155241-solved-duplicate-and-rename-image-files/ Share on other sites More sharing options...
MatthewJ Posted April 22, 2009 Share Posted April 22, 2009 If you're just using it as a default image if someone does not upload or choose one, whay make copies of it at all? They can all just point to the same image. Then all you need to do is check for the image, if there isn't one put the path to your default. Quote Link to comment https://forums.phpfreaks.com/topic/155241-solved-duplicate-and-rename-image-files/#findComment-816752 Share on other sites More sharing options...
iPixel Posted April 22, 2009 Author Share Posted April 22, 2009 LOL aparently i love to complicate things. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/155241-solved-duplicate-and-rename-image-files/#findComment-816760 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.