User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 361,949 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,627 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 658 | Replies: 2
Reply
Join Date: Feb 2008
Posts: 78
Reputation: bornok15 is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 1
bornok15 bornok15 is offline Offline
Junior Poster in Training

how to save and retrieve an image using mysql and php

  #1  
Apr 11th, 2008
I want to put image uploading in my page and i searched all over the net for some ways on doing this and its seems like almost all of the ways states that i should save it in the database itself not i directories. Will the image retain its properties from its original file upon retrieving a saved image? Can anyone help me how to do this? tanx..
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jun 2007
Location: Valley Center, Kansas
Posts: 489
Reputation: kkeith29 is on a distinguished road 
Rep Power: 2
Solved Threads: 45
kkeith29's Avatar
kkeith29 kkeith29 is offline Offline
Posting Pro in Training

Re: how to save and retrieve an image using mysql and php

  #2  
Apr 12th, 2008
never put an image into the database itself. just upload them into a directory and put the path to file in the database.
Reply With Quote  
Join Date: Dec 2007
Posts: 95
Reputation: mwasif is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 10
mwasif mwasif is offline Offline
Junior Poster in Training

Re: how to save and retrieve an image using mysql and php

  #3  
Apr 13th, 2008
It is always better to store the images on disk instead of database. File operations are always faster than database. Saving the images on disk will reduce your database size which will give you comfort when moving database or mainting database.

Don't save images in database unless you have some special requirements.

But if you still interested to same images in database then here is a small post to save images in database.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb PHP Marketplace
Thread Tools Display Modes

Other Threads in the PHP Forum

All times are GMT -4. The time now is 11:48 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC