Upload a File to MySQL Database using PHP

preview_player
Показать описание
Learn how to upload a file or an image to the database using php and also to store that file at a particular location for future use.

Link to My previous videos:

Thanks For Watching!
Track: Kozah - Haha [NCS Release]
Music provided by NoCopyrightSounds.
Watch:
Рекомендации по теме
Комментарии
Автор

it´s great, just what i need :D keep it up!

Alexandra-nolz
Автор

Can u please show me the structure from your table in phpmyadmin? Thank you very much!

maibaum
Автор

Anyone help, my file is not store in folder or not inserted data in database, path is correct, I use enctype, also but didn't get

priyanshpateriya
Автор

thankyou so much tried so many things but this worked on one go

sakshigoraniya
Автор

Hi there, having trouble: what filetype do we set in mysql for id, title, and image? Also file not uploading to server....

phatiklad
Автор

Hi, may i know how is the 'files' come from at line 39?? I keep getting undefined index :files?

chiamcheekang
Автор

Thank you it worked for me. great video

amiralinaser
Автор

hye, after we success this, hot to view that file? i hope you reply

aizatl
Автор

did you have to go into the terminal to give daemon access to the directory in which the file was to be added for it to successfully upload?

espressoinsight
Автор

works perfectly!! thank you so much!!!

DBR
Автор

Hye, can i know what type did you used for image in database table? varchar or blob?

shanggeethajeganathan
Автор

can someone answer my question, what if i want it to be pdf does the upload_dir = /pdf or /images

bashhlucky
Автор

Ive checked and i am connected to my sql database. My image does get uploaded to my folder in my server but my sql ‘INSERT’ command is where i think its going wrong. Do you know what it might be? Which datatype should i use in my sql database?


edit: i got it working. My database had columns that (werent automated} which i did not add information to, i guess that caused the error cause as soon as i deleted them it worked
. Thanks a lot!

jessebelleman
Автор

I am getting this error
Warning: move_uploaded_file(): Unable to move 'C:\xampp\tmp\php3684.tmp' to 'images/6602-pastry.jpg'
Could you please help?

senju
Автор

How can you add some tex to the image and then display it with this text?

chome
Автор

Can you please tell us how to fetch this pfd file from database and display on our webpage. Thank You.

tariqshaikh
Автор

im having error with the move uploaded file and with the tname=$_FILES["file" ] - and on this one, in your vid you put files* inside the square bracket but whenever i try the same it gives me an error, i checked the directory twice and the name spelling but there was nothing wrong

echizenryoma
Автор

please, help me, how to show file, espesially pdf from mysql (php)

harungb
Автор

I am looking for an excel file input from the user to my website, and wish to parse the file and store the contents in sql tables. Can anyone help me out with this?

nmnghngfh
Автор

what is the datatype used for storing files in mysql database? like what's the structure of database?

reznov