logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > General
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 07-28-2009, 01:21 PM   #1
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default Saving images in a database.

Hi, does anyone know how to save images in a database for future retrieval? or perhaps saving the link to it and saving the image itself in a folder? Thanks
gigiloumill is offline   Reply With Quote
Old 07-28-2009, 01:36 PM   #2
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

same as you would text I think. I think you need to tell SQL that it will be saved as a 'Blob' and then you'd use a file upload form. <<< I could be wrong tho
Corrosive is offline   Reply With Quote
Old 07-28-2009, 01:44 PM   #3
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

The file upload form would be different than the script used to insert text into mysql?
gigiloumill is offline   Reply With Quote
Old 07-28-2009, 02:07 PM   #4
Corrosive
Corrosive's Avatar
 
Join Date: Feb 2008
Location: Bristol, England
Posts: 7,103
Default

Quote:
Originally Posted by gigiloumill View Post
The file upload form would be different than the script used to insert text into mysql?
Yes, I believe so as you are asking to access a user's hard drive for a file upload. I think this takes a little more programming.
Corrosive is offline   Reply With Quote
Old 07-29-2009, 01:00 AM   #5
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

forms for uploading files need to be multipart and a script for uploading is needed . There's plenty around . if you are into using classes i would recommend Olaf Lederers class at http://www.finalwebsites.com/snippets.php?id=7
On another note though personally i would upload files to a directory and just add a link in the database
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-29-2009, 12:24 PM   #6
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

That's what I'm trying to do. I want to save file in a folder and save link in the db. I can't figure out how to cut and paste link into the form the field to send. Any suggestions? Thanks
gigiloumill is offline   Reply With Quote
Old 07-30-2009, 12:59 AM   #7
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

yes that should be vailable try a yahoogle there will be many upload scripts available there are some quoted on this forum quite recently
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-30-2009, 02:13 PM   #8
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

Thanks e, but I still can't figure this out. (it sucks being a nooby). Anyway, I set up a form to send into the db (which is working fine) and I also set up a pagination script to retrieve from the db (also working fine) but, I can't figure out, how to insert the images' path as well into the form for the pagination to retrieve. Any suggestions? Thanks.
gigiloumill is offline   Reply With Quote
Old 07-31-2009, 01:17 AM   #9
edbr
edbr's Avatar
 
Join Date: Aug 2005
Location: Bali
Posts: 11,164
Default

well only by repeating whay ive said. the process of uploading a file is first the form needs to be multipart, the file is uploaded to a folder.
ill have a look later if i can find a script for you but bit short of time at the moment
__________________
If you're happy and you know it shake your meds!
different style links examples

Flight / Hotel search
Free script download
Bali Villas
edbr is offline   Reply With Quote
Old 07-31-2009, 11:20 AM   #10
gigiloumill
gigiloumill's Avatar
 
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default

Thank you. Can it be tested on local server?
gigiloumill is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:50 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com