How To upload BLOB Image To Mysql Database Using PHP, SQL And HTML

preview_player
Показать описание

This tutorial demonstrates how to upload blob image files into mysql database using php and display them on html web page using Html. Of course content is fetched from mysql database using structured query language (SQL).Images column in the database is of type blob. Thus, when displaying images, they're retrieved directly from mysql database as a blob.

What we have used in this video :
1. PHP: Hypertext Preprocessor, programming language.
2. Mysql Database.
3. Apache HTTP Server.
4. Phpmyadmin.
5. Netbeans IDE(Integrated development environment);
6. Sublime Text Code Editor.
7. SQL: structured query language.
8. HTML: Hypertext Markup Language.
9. XAMPP localhost.

What we are trying to achieve:
1. Create database.
2. Create table with blob column where images will be inserted.
3. Create html form for selecting image from the computer.
4. Create sql queries for inserting and selecting data from mysql database.
And also queries for Creating database and tables.
5. Display image on web page using php and html.

This script checks if the database exists, if it doesn't, then a new database is created, also a new table is created. If the database exists, Then the existing database is selected. So their is no need for creating a new database and table using phpmyadmin. Just run the code and you will get messages of what is happening on your browser. Make sure the code is running from htdocs if you are using xampp Localhost. I will share the video of setting it up soon (localhost and where the folders are supposed to be placed).

Social Networks :
Рекомендации по теме
Комментарии
Автор

Best method ever! Nonsense people are using moveuploadedfile😂 and uploading only name of file! Pseudo Image Uploading....

I have found this tutorial after watching 56 nonsense tutorial, now I'm done, I am thankful to you for this tutorial dude!

shubhamsaini
Автор

Thank your very much for good job. Thanks, from Nepal.

dhakprasadupreti
Автор

Completely Madness: PLEASE GIVE YOUR LIFE TO CHRIST

vengombeendee
Автор

The upload process works. but when I retrieve the images, they do get retrieved, but they are broken (the file destroyed). how can I solve this?

raniamahmoud
Автор

return false ...
Where did I go wrong? how do i fix it?

SevenLeo
Автор

Hi, do you use NetBeans only to run your page? You have all the files on server, so why not: :)

liudasstonys
Автор

Can you insert video with LONGBLOB too ?

theophile
Автор

my image wont show up, can anybody tell me where am i wrong?

allianze