helppy Posted December 6, 2006 Share Posted December 6, 2006 I have a form that has a field and a button browse.I will click on the browse button to search for the image (in the computer) that i want, then I will click submit and it will store into my database.However what is stored in the database is the address (location of the image: eg C:\myimage.jpg).I don't the address to be stored but really the image itself. Help!!! Quote Link to comment Share on other sites More sharing options...
drifter Posted December 6, 2006 Share Posted December 6, 2006 well first of all in 99% of the times you will not want to put the image in the database, you will want to put it in a file and maybe store a path to the image. Quote Link to comment Share on other sites More sharing options...
helppy Posted December 6, 2006 Author Share Posted December 6, 2006 ok. noted.So if i store it as a path in the database, how to i retrieve the image.I want to use computer 1 to upload the image. Next, I will then use computer 2 to view the image. How do i retrieve it from the database the image's address/path then display out the image in computer 2?Need some help in codes.Thanks. Quote Link to comment Share on other sites More sharing options...
drifter Posted December 6, 2006 Share Posted December 6, 2006 do you need to retreive it for processing or display on the web? guess I am not sure what you are doing here. Quote Link to comment Share on other sites More sharing options...
helppy Posted December 6, 2006 Author Share Posted December 6, 2006 Retrieve it for processing and displaying.My database only stores the address of the image.When i want to retrieve the image from the database, i can't get it cos there is only the address of the image. Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted December 6, 2006 Share Posted December 6, 2006 you can store images in databases but its not really that good. but do what drifter is saying, upload the file to your server (if you dont want to then go for the storing in database) then in you db add the link to where the file was uploaded... Quote Link to comment Share on other sites More sharing options...
drifter Posted December 6, 2006 Share Posted December 6, 2006 you know even if your file is on another server, you can call it with a file_get_contents(),copy() or most of the other commands depending on how you have yours servers set up. This is how you gram images from the net - then you can process it. Quote Link to comment 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.