TGWSE_GY Posted April 26, 2009 Share Posted April 26, 2009 Hi guys, I am wondering since my system for my users has an upload images section and they upload them they are stored physically in a directory that matches their usernames. What I am wondering is how do I dynamicly pull the images from the directory, and also how would I keep track of which image they select to be their profile picture. Would I have to store information in a mysql database? Link to comment https://forums.phpfreaks.com/topic/155675-solved-dynamicly-pulling-images-stored-on-the-server/ Share on other sites More sharing options...
nankoweap Posted April 26, 2009 Share Posted April 26, 2009 does your application not have a database??? assuming it does, then storing the name of the selected profile picture would be a no-brainer. if your application doesn't have a database, then what are you using to store user and other application-related data? jason Link to comment https://forums.phpfreaks.com/topic/155675-solved-dynamicly-pulling-images-stored-on-the-server/#findComment-819371 Share on other sites More sharing options...
gffg4574fghsDSGDGKJYM Posted April 26, 2009 Share Posted April 26, 2009 You can encode them and put them into a database or move them into a /images/ directory and store the filename into the database. Encode them with that : http://www.php.net/manual/en/function.base64-encode.php And store the MIME type too if you store the whole file in a database. Link to comment https://forums.phpfreaks.com/topic/155675-solved-dynamicly-pulling-images-stored-on-the-server/#findComment-819374 Share on other sites More sharing options...
TGWSE_GY Posted April 26, 2009 Author Share Posted April 26, 2009 Thank you theonlydrayk, that helps imensley. and nankoweap, Firstly yes I have a database and it is already storing large amounts of user data and I have custom scripted everything from the Login system to the user management system. I am glad that to you it would be a no-brainer. I just simply asked a question to better understand what I was doing to make sure I was going about things the proper way. Thanks Link to comment https://forums.phpfreaks.com/topic/155675-solved-dynamicly-pulling-images-stored-on-the-server/#findComment-819615 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.