jessebirr Posted December 28, 2012 Share Posted December 28, 2012 Hi, I'm new to php freaks and php in general. I'm working on a church website, i have most of of the CMS build already. I need help with one part though. I need to upload photo to a database using php and mysql, this photo has to be displayed on the public site. The table is already made using phpmyadmin,p i have not typed any php for the photo upload form just the html. can you point me in the right direction. thanks Quote Link to comment https://forums.phpfreaks.com/topic/272443-photo-upload-cms-send-me-in-right-direction/ Share on other sites More sharing options...
Muddy_Funster Posted December 28, 2012 Share Posted December 28, 2012 you shouldn't store images in the database, it's not designed for that, files, such as images, belong in the filesystem. Quote Link to comment https://forums.phpfreaks.com/topic/272443-photo-upload-cms-send-me-in-right-direction/#findComment-1401765 Share on other sites More sharing options...
drewdan Posted December 28, 2012 Share Posted December 28, 2012 Upload the image to the filesystem and then insert the file name into the DB like you would an ecommerce store? That way you can qiery the database for your image and get the correct filename for it to call it. Or use the glob() function to return an array with all of the files in said directory, your images directory for example. How are you planning on displaying the image? P.S. Welcome to the Forum! Quote Link to comment https://forums.phpfreaks.com/topic/272443-photo-upload-cms-send-me-in-right-direction/#findComment-1401783 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.