How to Fetch / Display an IMAGE from DataBase using PHP Mysql

Sharing buttons:

hey guys so welcome to my channel and in

this video we'll be learning about how

to fetch the image from the database

okay so like how to do a tree or fetch

or display the image into the database

so let's start it I'll tell you and this

in last video we have stored some

database okay I mean images in the last

video I have told like how to insert an

image so if you don't know so please go

and check out that video how we are in

storing this image into the database and

in this video we'll be retrieving this

images okay with it the user name and

designation okay so we'll be retrieving

onto the display okay and this this

platform so display image dot PHP file

is that in this will display so let's go

to the coding and its design it okay so

before starting please subscribe my

channel like the video and share it to

your friends too okay let them also

subscribe please so let's start


and the commenting


I don't

so here is display like vitamin water

according to you okay

this declaration centered Lesbian Center

center more will be a fun okay so to the

filter from the third is equal to post

and ENC type Ally said this is very


my producer so he NC type multi-part

okay multi-part backslash and in /aa


and then we have to declare the coring

part in it to retrieve the images okay

so first we'll start with the table okay


and this

okay this will be th and this


retrieve image means okay now one more


so let's open this

I miss it and it makes up

okay so this player from it is very

simple manner now your name and the


okay we will stop

this is done now here we'll start with

the coding HP and finish but now with

that as usual connections will be the

connection is equal to minus Q life

Connect is Q like connect then you have

to connect the localhost

first username and password and then

declare to our database MySQL I selected


open this connection ctrl-c ctrl-v

leave comma in single quotes we have to

put your database name okay so here to

database name and database name means

it'll be okay we have to database name

okay so our connection is done now let's

write that query we are not using any

button or anything so we are not using

if I said okay it's clear right so yes

we are retaining the image directly

select as normal MySQL query coal tar

from EMP

I am Reggie this is my table name okay

so in my database

EMP image okay so it will retrieve all

this three displays so I mean that is my

table and I will

I am just very off how to give this

connection okay that connection will

connect your database and give comma and

the Harper include their query so the

connection will go on

bring the play

okay so to retrieve as usual you know

like we have to use my look our for each


so we'll be linked violin dollar to

dollar is equal to MySQL I am just go

fetch so this and this what we should

fetch is that this worry okay this one

is run you have to fetch this this query

run will be fished and captain dollar

okay so a simple so let's yeah open the

bracket and so in this will be

retrieving that code so like we have to

type HTML tags so that this table should

be continued in so before that we'll

declare this

so here goes the PHP and we'll start on

PHP here okay so this now we'll be doing

the HTML tags okay so like we ended with

the table go I will start with the TR

okay NS TR

now we okay

I've no nothing so here we look for the

image right so far image and close the

PHP night okay now here will be a Korean

the value so let's start it this

first surprise in this SRC is equal to

disturbance data : image okay and then

is 64

single-pole okay so don't get confused

I'll make it separate single dot dot

inside net type is 64 underscore encode

yeah and good off matter that is low

I am a GP image so this earlier data


now let's declare and we'll be wanting

that is like

after the

so you have to be very careful in

deciding okay

declare all Intracoastal like whatever

name you can get in this image okay and

force tile will be worse time for this

like it should be reeled in that much

only this tile in the culture

a stylish Mapleton

and it will fill we will give with the

night rocket with mr. 100px : then


mr. 100px yeah this is enough okay so

width and height is set now we'll go to

second path like after this given enter

then open TD now this will be very small

okay so rehashed be open and close PHP

then you have to show the value let go

single quotes close and this we have not

declared in limited right so directly do

the value go off username okay so this

is some database this is an about it so

this is an image college from the



those PHP so it's a very simple way to

declare it simple way means it's a

normal thing in a simple way


okay so this is the code for retrieving

the image from the database okay like if

you follow this according to it

eternally let's check out the result for

this save this

I think ctrl s and go back to your page

we were here according to your plan see

this display is too little

so let's go back and just give in the

table itself here - okay this table just

wet with just width is equal to


murder is equal to one then cell padding

so spacing okay so is anything close to

fight yeah

so Syrian problem


so this is how we with the image into

from the database token from this all

this images our view from the data so

I don't






and then for this



this play




so that's all guys in this video thank

you for watching this video and please

share to your friends so they may

subscribe me and like the video please

you too like the video share the video

and subscribe me please guys unless the

Bell item so you may get my notification

thank you for watching this video