How to upload image to MySQL database and display it using php

Поділитися
Вставка
  • Опубліковано 3 лют 2025

КОМЕНТАРІ • 574

  • @needtonow5762
    @needtonow5762 4 роки тому +6

    Great job on this! So many presenters do not bother to first show what the code does before showing how to code it. Also kudos on giving out the source code. Believe me no sound is needed when you have been so helpful.

  • @RenanWitt
    @RenanWitt 8 років тому +17

    First in my language (portugues): Muito obrigado! Em meio a milhões de vídeos, este foi o único que me ajudou.
    Now, in your language: Thank you! Between the million videos, this only what help me.

    • @AwaMelvine
      @AwaMelvine  8 років тому +4

      my pleasure. Thanks so much for watching :D

  • @kmssi1538
    @kmssi1538 2 роки тому

    it's 2022 and you literally save my suffering, images are not being uploaded when its from "Downloads folder" for example, and i just took some codes from this vid and it works!Thank you.

  • @Nikita-iv4jp
    @Nikita-iv4jp 5 років тому +3

    First in my language (russain): Спасибо
    ))
    Now, in your language: Thank you! Between the million videos, this only what help me. ))

    • @AwaMelvine
      @AwaMelvine  5 років тому

      Thank you very much too!

  • @delfinotachi1686
    @delfinotachi1686 3 роки тому

    This guy is underrated. You are one of the best tutors on youTube. You should be at over 600k subscribers.

  • @maleficgunner5245
    @maleficgunner5245 5 років тому +5

    you made the tutorial short simple yet it is very helpful. thanks dude!

  • @TGDTom
    @TGDTom 6 років тому

    Really the only proper video on UA-cam that covers this subject. Thanks a lot!

  • @MrPherez
    @MrPherez 7 років тому +1

    this is a good tuitorial , i have followed through and managed to piece it together and its now working, the only thing i noticed about it is that when you post it post blank text and photo holder. maybe i should apply that function that defines that when none of the conditions are met then the posting should not occur

  • @JesusHilarioH
    @JesusHilarioH 7 років тому

    Exactly what I needed! I like that your explain what your are doing with comments! Awesome, thanks. :) Warmest regards, -South Texas.

  • @aforict8421
    @aforict8421 4 роки тому

    Works perfectly. thanks from Sri Lanka

  • @mohammedabdulhady8926
    @mohammedabdulhady8926 7 років тому

    I Love You

  • @rosettedf6574
    @rosettedf6574 7 років тому

    This is the only tutorial that works for me.. Thank you

  • @ankitsam4880
    @ankitsam4880 3 роки тому

    thank you
    very helpful video
    love from India

  • @oldguy8177able
    @oldguy8177able 5 років тому

    yes works thanks,if you want multi uploads with text,use sessions with localstorage,use session first ,next page use localstorage set and get

  • @YUhave2Bawsome
    @YUhave2Bawsome 4 роки тому +1

    Thanks for the vid, really helped me out with image type insert and selects!

  • @abhishekkaushal8407
    @abhishekkaushal8407 7 років тому

    thanks to you I was able to upload DOCX and PDF file in db and able to display it.

  • @TheWFLE
    @TheWFLE 5 років тому

    It's really helpful... I just wish I had the attention span to actually get anything from it. LOL my brain's fried for finals week :)
    Thank you so much though! You're amazing!!

  • @tsvetomir5309
    @tsvetomir5309 6 років тому +1

    you can fix the repeat bug by moving the form in a another php file . thanks for the code awe you are the best !

  • @shamimsarker839
    @shamimsarker839 4 роки тому

    Thank u so much.. Love from Bangladesh.

  • @mdmasud5888
    @mdmasud5888 8 років тому +1

    Successfully I have solved my problem. Thank you so much for your tutorial.

  • @phillipisaac4337
    @phillipisaac4337 6 років тому

    it works perfect. Thank you very much. Greetings from Brazil !!

  • @xyzrgp
    @xyzrgp 8 років тому

    thanks for this video, before empty images were uploaded to server. But, your code solved it. thanks

  • @ninip2008
    @ninip2008 4 роки тому

    Many thanks! Big hug from Berlin.

  • @prabhakarreddy7988
    @prabhakarreddy7988 7 років тому

    great video man,,, i tried it and succeed,,,love you

  • @NoorMohamed-hb7ce
    @NoorMohamed-hb7ce 3 роки тому

    Very brilliant and fantastic presentation 👍❤️......100k likes.....

  • @priyadharshinimuthukumar8970
    @priyadharshinimuthukumar8970 2 роки тому

    thank you so much ..i have learnt alot

  • @programmingtutorialsmadesi6864
    @programmingtutorialsmadesi6864 4 роки тому

    thanks bro you helped me a lot

  • @Etp369
    @Etp369 2 роки тому

    Thanks a lot man to make it easy for us.

  • @gamerspieler8196
    @gamerspieler8196 2 роки тому

    You have helped me a lot :)

  • @sandipanmondal9474
    @sandipanmondal9474 7 років тому +1

    Thanks, I like you video. it is very useful thing.

  • @jin60jir
    @jin60jir 6 років тому +1

    Great tutorial. It was helpful for me :)

  • @KimKongKun1337
    @KimKongKun1337 7 років тому +1

    To all the people who have problem uploading the picture to the database, this is the solution:
    He wrote this: $sql = "INSERT INTO images (image, text) VALUES ('$image', '$text')";
    You should use this: $sql = "INSERT INTO images (image, image_text) VALUES ('$image', '$text')";

  • @soonsaeng2503
    @soonsaeng2503 8 років тому +2

    Hi Awa Melvine,Thanks so much for creating this demo. Excellent job!Regards,Soon

  • @gogoulor
    @gogoulor 7 років тому

    Works perfect. I just prefer to change image name in order to keep database and image with the same index. Thanks and BR. it is needed to avoid sql injection.

  • @harvintoledo734
    @harvintoledo734 8 років тому

    You're example is wonderfull. Thanks!

  • @mathewkings9806
    @mathewkings9806 4 роки тому

    Sweet bro, thanks a lot, really helpful even till now.

  • @jineshmehta9259
    @jineshmehta9259 7 років тому

    Awesome..it works very well... Thanks !!!

  • @Ruuncraft
    @Ruuncraft 3 роки тому

    Thanks a lot from my heart, you are amazing on writing this code simple and easy.

  • @B_DWisdomPills
    @B_DWisdomPills 8 років тому +2

    Quite detailed GOOD...........

  • @siddheshkadam136
    @siddheshkadam136 8 років тому

    Thanks Brother..Really Helped a lot....!!!

  • @Aaminul555
    @Aaminul555 Рік тому

    Thanks a lot Bro ! very useful project indeed.

  • @dhproductions6722
    @dhproductions6722 7 років тому

    Very Well Boy keep It Up Very Nice Explaination

  • @arshadhussain5355
    @arshadhussain5355 6 років тому

    Thanks!!! Works like a charm...

  • @kriziacarissepangan1590
    @kriziacarissepangan1590 3 роки тому

    Thanks, bruuh! Moree!

  • @savehands9135
    @savehands9135 2 роки тому

    you are the best bro

  • @maorweiss7007
    @maorweiss7007 5 років тому

    Simple and useful. Thank U!

  • @m_jameem
    @m_jameem 5 років тому

    thank you sir , lesson is very helpful 😊😊

    • @mrendus
      @mrendus 5 років тому

      FUCK YOU ITS DONT WORK IDIOT

  • @DanielK48
    @DanielK48 6 років тому

    Thanks for the great video! Ot helped me a lot ! :)

  • @lightandpeace967
    @lightandpeace967 8 років тому

    thnks for uploading video !!!!!
    its very helpful for my today prject.

  • @meatfactory
    @meatfactory 5 років тому +1

    Thnx, this was very helpful!

  • @dhakprasadupreti6249
    @dhakprasadupreti6249 4 роки тому

    Thank you very much for help. Your help became useful.

  • @shwetagupta2662
    @shwetagupta2662 6 років тому

    Its really helpful video thanku so much for the useful information.
    Really Appreciable

  • @josephat8824
    @josephat8824 2 роки тому

    You deserve my sub bro

  • @CroixdeTrefle
    @CroixdeTrefle 8 років тому +3

    Thanks for this video ! I needed to create a gallery with a page generated by php

    • @AwaMelvine
      @AwaMelvine  8 років тому +1

      Thanks for watching :D

  • @craigharkins4669
    @craigharkins4669 8 років тому +4

    Thank you so much man!!!!! Works great!

    • @AwaMelvine
      @AwaMelvine  8 років тому +2

      My pleasure. Thanks for watching

  • @FairoozZafar
    @FairoozZafar 8 років тому

    thanks. worked perfectly!

  • @bigsmoke5930
    @bigsmoke5930 2 роки тому

    Thank you very much Sir! Amazing

  • @xharemslive7143
    @xharemslive7143 2 роки тому

    Thnx bro it helped a looooot

  • @nimesh519
    @nimesh519 6 років тому

    thanks ,your tutorial helps me lot............

  • @LUSIANSTUDIOS
    @LUSIANSTUDIOS 7 років тому +1

    Works perfectly, thanks!

  • @vinhvo4816
    @vinhvo4816 4 роки тому

    Thank you very much, i hope you made next video.

  • @PCHIOLKIN_YU
    @PCHIOLKIN_YU 6 років тому +4

    Thanks! You helped me to make my diploma)) :D

  • @OneInChristComedy
    @OneInChristComedy 5 років тому

    Wow, I love your videos. Please create a tutorial on uploading and viewing a pdf document with php and mysql as you did in
    How to create a blog in PHP and MySQL database

  • @--b1331
    @--b1331 4 роки тому

    thank you my friend i wish good and health for you

  • @bgmibrutal4347
    @bgmibrutal4347 7 років тому

    Very helpful ...Thank you very much...

  • @harrisleshaba2348
    @harrisleshaba2348 7 років тому

    good work man keep it up

  • @delfinotachi1686
    @delfinotachi1686 3 роки тому

    Thank you so much for this video.

  • @tigger2581
    @tigger2581 4 роки тому

    great tutorial dude

  • @anganhvo3071
    @anganhvo3071 7 років тому

    tkx guy, this is so great

  • @Er.MeetPatel
    @Er.MeetPatel 4 роки тому

    Amazing video thank you for code

  • @technest4013
    @technest4013 4 роки тому

    awosome well done dude

  • @youShouldKnowFacts-y2x
    @youShouldKnowFacts-y2x 7 років тому

    im having error in line-"if(move_uploaded_file($_FILES['name']['tmp_name'], $target))" and error is-"[20-Jul-2017 09:11:45 Etc/GMT] PHP Notice: Undefined index: tmp_name in /home/rahasyaainc/public_html/Mukund/uploads.php on line 27"

  • @bhagyashreegaonkar9191
    @bhagyashreegaonkar9191 8 років тому

    Its good, I like your tutorial
    Thank you

    • @vineshsave652
      @vineshsave652 7 років тому

      pls help meeeeeeeeeeeeeeeeeeeeeeeeeeeeee

  • @Andrei-ds8qv
    @Andrei-ds8qv 6 років тому

    THAT IS AWESOME MAN!! THANKS!

  • @elaandreaaparecio2989
    @elaandreaaparecio2989 6 років тому

    Thanks! this helps a lot! :D

  • @koyawell2551
    @koyawell2551 4 роки тому

    for some having trouble saving it to database
    in line: $sql = "INSERT INTO images (image, image_text) VALUES ('$image', '$image_text')";
    change image_text to text since he used text column in this video
    code: $sql = "INSERT INTO images (image, text) VALUES ('$image', '$image_text')";

  • @gloriabukachi1
    @gloriabukachi1 6 років тому

    great video, thank you so much!

    • @AwaMelvine
      @AwaMelvine  6 років тому

      I'm glad you liked it. Thank you too for watching!

  • @Utteeya
    @Utteeya 6 років тому

    Start watching from 3:24 min

  • @AliciaGuitar
    @AliciaGuitar 4 роки тому

    Something must have deprecated because the profiles.php didn't work. I changed the query to object oriented latest php standard for arrays and used the while loop instead of foreach and it worked like a charm! Now I gotta learn how to make this secure because its a php attack waiting to happen!

  • @josephat8824
    @josephat8824 2 роки тому

    great job thx dear bro!

  • @vuongkhaikiet2264
    @vuongkhaikiet2264 7 років тому

    thanks very much for your lesson

  • @kishankhant8011
    @kishankhant8011 6 років тому

    Nice work. Thank for this information, suggests you set some background music.

  • @puneetgandhi5740
    @puneetgandhi5740 6 років тому

    thanks sir.....for making this video....

  • @marcoantonio7634
    @marcoantonio7634 7 років тому +6

    Bro, Notice: Undefined index: tmp_name in C:\xampp\htdocs\upload\index.php on line 14

  • @SarainVienna57
    @SarainVienna57 8 років тому +6

    Hi, a little help please. I did everything as you and there are no errors but the image won't upload to the database..

    • @sharifabahar6257
      @sharifabahar6257 6 років тому +2

      make a folder named 'images' in ur root folder (i mean in the same folder where ur index file is stored) then put ur images there, then it works.

  • @maciejwisniewski5026
    @maciejwisniewski5026 6 років тому

    You very help me. Thank you ;)

  • @hermanomark
    @hermanomark 6 років тому

    it worked for me now.. just remove the id in database

  • @Shogoeu
    @Shogoeu 5 років тому +14

    This is not "uploading image to MySQL", it's uploading image to a folder and saving the path to the image in MySQL.

    • @faizy3132
      @faizy3132 3 роки тому

      we can upload image to Db we wonly fetch adress thats y we upload image to folder

  • @mahendrant9306
    @mahendrant9306 8 років тому

    u r awesome dude.....

  • @yasee3fjdje
    @yasee3fjdje 4 роки тому

    thank you
    you are the best !!

  • @rutherjademarte5987
    @rutherjademarte5987 3 роки тому

    The code works, but there is an issue, if u refresh the page. The last pic u uploaded will continue to upload like a loop.

  • @manailii2
    @manailii2 5 років тому

    I am big fan for yoooouuuuuu maaaaaaaaaannnn

  • @kenichimendoza8571
    @kenichimendoza8571 6 років тому +2

    Cam someone help me?
    It does upload my image into the designated folder but its name is changing into 1.(its extension). And its not also recorded in my MySQL database. What's the problem?
    I'm using a webserver.

  • @PavanKumar-qj3lf
    @PavanKumar-qj3lf 5 років тому

    Superb bro

  • @satyamsurajmaurya3818
    @satyamsurajmaurya3818 8 років тому

    thanks bro really helpful

  • @shwetagupta2662
    @shwetagupta2662 6 років тому

    The video tutorial is very useful ,Really Appreciable
    But there is issue occuring that text and image upload the post on the front end as well as in the database but the images are not visible in the front end and images are not shown in the images folder too.........please guide me what to do in this query

  • @karaoketimor
    @karaoketimor 5 років тому

    Thanks for your tutorial anyway i did same you way but i dont see image in to folder which i use for image. Can you help me for this issue?

  • @vicodev444
    @vicodev444 2 роки тому

    hello, if I also wanted to delete with a key what I entered?
    Type also delete the image from the folder.
    I thank you

  • @poypoytomato
    @poypoytomato 6 років тому

    Object not found!
    The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about the error.
    If you think this is a server error, please contact the webmaster.
    Error 404
    localhost
    Apache/2.4.29 (Win32) OpenSSL/1.1.0g PHP/7.2.3

  • @HapticAaron
    @HapticAaron 7 років тому

    This 'works' however the images are not being placed into the database. The name of the image is but the actual image is being placed into the images folder on your machine - not the database. I know the description mentions this but the title is a bit misleading.

    • @HapticAaron
      @HapticAaron 7 років тому +1

      Update- I was very tired and misunderstood the video, this is in fact exactly what I needed. Good job.