Insert and Fetch Images From Mysql Database in PHP

Insert and Fetch Images From Mysql Database in PHP

Webslesson

7 лет назад

287,820 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@diehard-fans1
@diehard-fans1 - 30.10.2023 05:05

is this oky to run in vs code

Ответить
@roselynptrck7329
@roselynptrck7329 - 29.09.2023 03:44

hello sir, can i know how to delete multiple picture on php ?

Ответить
@joshuaolushola9780
@joshuaolushola9780 - 29.09.2021 20:40

What if I need to upload more than one image in a single code?

Ответить
@nuramirahsyahirahzainurin6151
@nuramirahsyahirahzainurin6151 - 06.06.2021 16:23

Did anyone know how to edit/update if it is involve pdf file?

Ответить
@giulioaltomari4972
@giulioaltomari4972 - 09.05.2021 22:59

i spent an entire day not figuring out why i displayed some random code instead of the images, then i came upon this video......... may god bless you and base64 <3

Ответить
@HamzaKhan-fl8fp
@HamzaKhan-fl8fp - 23.03.2021 19:43

wow its magic i am working from an hour and just watch 1o sec of this video makes me correct

Ответить
@MAAZKHAN-xv1lc
@MAAZKHAN-xv1lc - 21.03.2021 16:14

Please start the WordPress plugin development course

Ответить
@neighbourhoodcoder5988
@neighbourhoodcoder5988 - 20.03.2021 16:18

you should have use react to make it more complicated.

Ответить
@vinaykamble1736
@vinaykamble1736 - 09.03.2021 09:00

Sir but it is not working if image is png

Ответить
@vinaykamble1736
@vinaykamble1736 - 03.03.2021 06:58

Really thank you sir, this video helps me a lot to complete my project.

Ответить
@osmanelsharif533
@osmanelsharif533 - 03.02.2021 01:40

How to update img

Ответить
@afsaralishaikh1038
@afsaralishaikh1038 - 11.01.2021 15:17

Is there is any way to see uploaded images on other page?
Plz revert if anyone knows

Ответить
@hoangkhai1693
@hoangkhai1693 - 31.12.2020 07:21

A la verga.

Ответить
@anthonyjennifer4755
@anthonyjennifer4755 - 13.12.2020 20:53

sir please how do see how u created the database and the way u saved ur images

Ответить
@yogeshchandra9603
@yogeshchandra9603 - 29.09.2020 10:08

thank you bro.. really

Ответить
@jyothis9350
@jyothis9350 - 30.08.2020 19:06

hi sir,
how to include uploading image as an optional field in the form?

Ответить
@besllu8116
@besllu8116 - 24.08.2020 18:26

Hate the audio, so bad quality.

Ответить
@nerphorn5215
@nerphorn5215 - 23.08.2020 02:07

are you a Bot LMAO!

Ответить
@StefanoGentile01
@StefanoGentile01 - 28.07.2020 12:29

doesn't work

Ответить
@pranavkurkure6091
@pranavkurkure6091 - 05.07.2020 10:54

best tutorial so far...thanks

Ответить
@mot.z795
@mot.z795 - 19.06.2020 17:12

thank-you ^_^

Ответить
@ahmedoun2152
@ahmedoun2152 - 24.05.2020 06:00

PLZ i want an explication for this line
<img src="data:Image/Jpeg;base64,'.$row['name'].'">
what i must put in this parameter data:

Ответить
@RiteshKudalkar
@RiteshKudalkar - 15.04.2020 15:05

Bite me!

Ответить
@waqasbhatti4478
@waqasbhatti4478 - 13.04.2020 17:41

i am unable to store 1mb size image using blob can u help me

Ответить
@gustavemuhoza6281
@gustavemuhoza6281 - 11.04.2020 23:17

Great, Everything is working properly

Ответить
@fernandaayala5632
@fernandaayala5632 - 02.04.2020 08:01

I FUCKING LOVE YOU SO MUCH, THAN YOU LOTS <3 <3 <3 <3 <3 <3

Ответить
@diseaseandtreatment7033
@diseaseandtreatment7033 - 22.03.2020 09:30

JavaScript code not work

Ответить
@kaderobaidul9816
@kaderobaidul9816 - 09.03.2020 12:57

How to add database.please detail

Ответить
@yasminmogal3381
@yasminmogal3381 - 04.03.2020 21:07

Thank you so much it was very useful for beginners

Ответить
@sebastianpetrescu997
@sebastianpetrescu997 - 14.02.2020 23:08

if nothing happens CHANGE BLOB with LONGBLOB

Ответить
@tichachamumapfanyangira1539
@tichachamumapfanyangira1539 - 18.01.2020 00:36

works thank you

Ответить
@robroy4046
@robroy4046 - 28.09.2019 10:32

but if you try to refresh the page after you submit it will submit again, do you have solution with that?

Ответить
@bobspoon5481
@bobspoon5481 - 30.08.2019 17:26

my image isn't being fully display , then i made
`name` blob NOT NULL,
into
`name` longblob NOT NULL,
and it worked perfectly..

Ответить
@aelanizlan18
@aelanizlan18 - 26.08.2019 04:50

yall girls probably gets horny by listening his voice

Ответить
@karaoketimor
@karaoketimor - 17.08.2019 12:41

why your voice like robots

Ответить
@dontbeafraid5313
@dontbeafraid5313 - 28.07.2019 12:22

Wtf.. Why your voice like that? It makes this tutorial hard to follow

Ответить
@edwinbessard7563
@edwinbessard7563 - 23.07.2019 17:09

when i press the insert button, it says no file selected.

please help. thanks

Ответить
@baidhyaorish1897
@baidhyaorish1897 - 02.07.2019 04:58

i havea an error( Undefined index: temp_name) on temp_name ($file=addslashes(file_get_contents($_FILES["image"]["temp_name"]));)

Ответить
@tijanimustapha9376
@tijanimustapha9376 - 30.06.2019 02:17

the image is not displaying from sql, it only show an image sign 'img'

Ответить
@imyou1166
@imyou1166 - 24.06.2019 13:45

I can pay you if you teach like this. So simple easy to understand. Wow. good job..

Ответить
@oldguy8177able
@oldguy8177able - 23.06.2019 13:04

check php.ini uploads ok

Ответить
@tijanimustapha9376
@tijanimustapha9376 - 23.06.2019 03:22

thank you very much "problem solve"

Ответить
@alisapopa937
@alisapopa937 - 05.06.2019 23:00

You're the beeeest! Thank you!

Ответить
@fhadillahshahran8560
@fhadillahshahran8560 - 27.05.2019 07:07

how can i display one image same id on php

Ответить
@FreedomForKashmir
@FreedomForKashmir - 26.05.2019 11:32

Solution to issue ::
If someone having issue that whole picture is not displaying properly or 1/5th of the picture is displaying ............then change the datatype of name column from "BLOB" to "LONGBLOB" in your database.
Hopefully it will help

Ответить
@heyitsarii78
@heyitsarii78 - 23.05.2019 13:30

Hi could someone please help me, how can i do this things. I want to upload image and insert in into database along with the user id that is currently using that session. Previously I’ve tried some method same as this tutorial but it only stores the image that have been uploaded without storing the user id. How can i do this? 😢

Ответить
@Kasador
@Kasador - 23.05.2019 02:48

Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean
This doesn't work; or I should it works up until' inserting the image.

EDIT:

I fixed mine by changing ORDER BY id to ORDER BY imgId because I changed my primary key in my MySQL to be imgId not id
Also, I'd like to mention that I've added this as well;

if($result === FALSE) {
die(mysql_error());
alert('An error occurred. Please clear cache, refresh page, and try again...');
}

Happy Coding Y'all!

Ответить