Click here to Skip to main content
15,889,200 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I need a comprehensive example of MySQL commands using PHP which i can use to store images into MySQL Database. I also wish to know how to display them in a user registration system.
You can also mail me directly using [email removed]
Thanks in anticipation of your assistance.
Posted
Updated 25-Jun-10 1:05am
v2

1 solution

this is a full article Storing Images in MySQL with PHP maybe can help you
 
Share this answer
 
Comments
Unamka 25-Jun-10 7:35am    
Thanks for that link. Actually i've seen that tutorial before but it doesn't say how you can specify a folder to insert the image.
It only explains how to connect and insert but doesn't say anything about the folder where the image will be placed. Can u please look into this and explain how that problem can be solved.
Thanks.
Adrabi Abderrahim 25-Jun-10 8:50am    
file is loaded in tmp_dir (see your php.ini "upload_tmp_dir" for path)

but maybe you don't need it? you simply use :
if(!isset($_FILES['userfile']))
{
echo "error!";
}
and file uploaded automatically in tmp_dir, read it and store bytes in DB!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900