By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,956 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,956 IT Pros & Developers. It's quick & easy.

how to store image in database?

P: 1
i have build a small website in my PC using PHP and mysql.
it is a social networking site. everything was working fine...... but i noticed that whenever i am saving a profile picture, it is being saved in that folder in which all other php files are stored. so, i reached on to a conclusion that if i create too many users and give them a profile picture each then that folder will be too messy....
My problem lies here......
i was thinking that i am storing my images in mysql databases but in reality it is not being saved there...... plz tell me , how would i make these storage efficient in terms of numbers?

I am using xampp on wnidows 7......
Aug 13 '13 #1
Share this Question
Share on Google+
2 Replies


Exequiel
100+
P: 287
when you are going to upload an image or any files, you need to create a program that will automatically generate a unique name for every files that you are going to save, the file name must be unique every time you are going to upload, example: filename_121212.jpg, filename_234345345.jpg,
Aug 14 '13 #2

Exequiel
100+
P: 287
Visit this link. . http://bytes.com/topic/php/answers/9...ideos-database
Then download this one, it is a sample uploading in php. http://www.mediafire.com/download/1i...load_video.rar
Aug 14 '13 #3

Post your reply

Sign in to post your reply or Sign up for a free account.