Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
How to get photos in a MySQL database
Old 10-17-2006, 12:01 AM How to get photos in a MySQL database
Extreme Talker

Posts: 163
Name: James
Location: Australia
Trades: 0
I have plans for a web site which requires images to be saved onto the database, and I seek information about how this happens.


A web site like that of where a person submits a photo, for that photo to be placed on a web page as required. Like a photo on a love matching web site or etc.
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
 
Register now for full access!
Old 10-17-2006, 01:01 AM Re: How to get photos in a MySQL database
mgraphic's Avatar
Truth Seeker

Latest Blog Post:
JAMISONTUNES
Posts: 2,898
Name: Keith Marshall
Location: Connecticut
Trades: 0
Saving binary data in a db has the potential of being corrupted and/or becomming very large in size very fast. An alternative method is to store the file location in the db, and have the actual file in a protected directory.
__________________

<mgraphic /> - I don't have a solution but I admire the problem.

Last edited by mgraphic; 10-17-2006 at 01:01 AM.. Reason: spelling
mgraphic is offline
Reply With Quote
View Public Profile
 
Old 10-20-2006, 11:19 AM Re: How to get photos in a MySQL database
seomumbai's Avatar
Skilled Talker

Posts: 98
Trades: 0
u can save data in data base but it can be corrupted and can become large and lead to sever crash so better to store the file location so that the orginal file can be protected
seomumbai is offline
Reply With Quote
View Public Profile
 
Old 10-21-2006, 06:49 AM Re: How to get photos in a MySQL database
liandra's Avatar
Experienced Talker

Posts: 35
Trades: 1
save the image data as longblob in mysql, for how to upload a file through form->PHP
use this as form input

HTML Code:
<form method="POST" enctype="multipart/form-data" name="image_upload_form" actio
n="<?$_SERVER["PHP_SELF"];?>">
<p><input type="file" name="image_file" size="20"></p>
<p><input type="submit" value="Upload Image" name="action"></p>
</form>
then use $_FILES array in PHP to retrieve the image file
__________________

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE
liandra is offline
Reply With Quote
View Public Profile
 
Old 10-25-2006, 01:54 AM Re: How to get photos in a MySQL database
Extreme Talker

Posts: 163
Name: James
Location: Australia
Trades: 0
Quote:
Originally Posted by liandra View Post
save the image data as longblob in mysql, for how to upload a file through form->PHP
use this as form input

HTML Code:
<form method="POST" enctype="multipart/form-data" name="image_upload_form" actio
n="<?$_SERVER["PHP_SELF"];?>">
<p><input type="file" name="image_file" size="20"></p>
<p><input type="submit" value="Upload Image" name="action"></p>
</form>
then use $_FILES array in PHP to retrieve the image file
Thanks, I shall try that over the next few days.
TRANZIT JIM is offline
Reply With Quote
View Public Profile Visit TRANZIT JIM's homepage!
 
Old 10-29-2006, 07:23 AM Re: How to get photos in a MySQL database
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,520
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
DON'T


for the same reasons as here http://www.webmaster-talk.com/the-da...2-as-blob.html
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to How to get photos in a MySQL database
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.18956 seconds with 12 queries