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

Поделиться
HTML-код
  • Опубликовано: 30 янв 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.

  • @delfinotachi1686
    @delfinotachi1686 3 года назад

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

  • @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. ))

  • @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 RUclips 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

  • @mohammedabdulhady8926
    @mohammedabdulhady8926 7 лет назад

    I Love You

  • @JesusHilarioH
    @JesusHilarioH 7 лет назад

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

  • @rosettedf6574
    @rosettedf6574 6 лет назад

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

  • @xyzrgp
    @xyzrgp 8 лет назад

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

  • @aforict8421
    @aforict8421 4 года назад

    Works perfectly. thanks from Sri Lanka

  • @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 !

  • @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

  • @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 !!

  • @ankitsam4880
    @ankitsam4880 3 года назад

    thank you
    very helpful video
    love from India

  • @soonsaeng2503
    @soonsaeng2503 8 лет назад +2

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

  • @Utteeya
    @Utteeya 6 лет назад

    Start watching from 3:24 min

  • @CroixdeTrefle
    @CroixdeTrefle 8 лет назад +3

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

  • @ninip2008
    @ninip2008 4 года назад

    Many thanks! Big hug from Berlin.

  • @craigharkins4669
    @craigharkins4669 8 лет назад +4

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

    • @AwaMelvine
      @AwaMelvine  8 лет назад +2

      My pleasure. Thanks for watching

  • @shamimsarker839
    @shamimsarker839 4 года назад

    Thank u so much.. Love from Bangladesh.

  • @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.

  • @prabhakarreddy7988
    @prabhakarreddy7988 7 лет назад

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

  • @Etp369
    @Etp369 2 года назад

    Thanks a lot man to make it easy for us.

  • @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')";

  • @LUSIANSTUDIOS
    @LUSIANSTUDIOS 7 лет назад +1

    Works perfectly, thanks!

  • @NoorMohamed-hb7ce
    @NoorMohamed-hb7ce 3 года назад

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

  • @maorweiss7007
    @maorweiss7007 5 лет назад

    Simple and useful. Thank U!

  • @arshadhussain5355
    @arshadhussain5355 6 лет назад

    Thanks!!! Works like a charm...

  • @priyadharshinimuthukumar8970
    @priyadharshinimuthukumar8970 2 года назад

    thank you so much ..i have learnt alot

  • @gamerspieler8196
    @gamerspieler8196 2 года назад

    You have helped me a lot :)

  • @mathewkings9806
    @mathewkings9806 4 года назад

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

  • @harvintoledo734
    @harvintoledo734 8 лет назад

    You're example is wonderfull. Thanks!

  • @Ruuncraft
    @Ruuncraft 3 года назад

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

  • @programmingtutorialsmadesi6864
    @programmingtutorialsmadesi6864 4 года назад

    thanks bro you helped me a lot

  • @PCHIOLKIN_YU
    @PCHIOLKIN_YU 6 лет назад +4

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

  • @jin60jir
    @jin60jir 6 лет назад +1

    Great tutorial. It was helpful for me :)

  • @B_DWisdomPills
    @B_DWisdomPills 8 лет назад +2

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

  • @jineshmehta9259
    @jineshmehta9259 7 лет назад

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

  • @FairoozZafar
    @FairoozZafar 8 лет назад

    thanks. worked perfectly!

  • @dhproductions6722
    @dhproductions6722 7 лет назад

    Very Well Boy keep It Up Very Nice Explaination

  • @savehands9135
    @savehands9135 2 года назад

    you are the best bro

  • @sandipanmondal9474
    @sandipanmondal9474 7 лет назад +1

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

  • @meatfactory
    @meatfactory 5 лет назад +1

    Thnx, this was very helpful!

  • @siddheshkadam136
    @siddheshkadam136 8 лет назад

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

  • @lightandpeace967
    @lightandpeace967 8 лет назад

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

  • @m_jameem
    @m_jameem 5 лет назад

    thank you sir , lesson is very helpful 😊😊

    • @mrendus
      @mrendus 5 лет назад

      FUCK YOU ITS DONT WORK IDIOT

  • @Aaminul555
    @Aaminul555 Год назад

    Thanks a lot Bro ! very useful project indeed.

  • @--b1331
    @--b1331 4 года назад

    thank you my friend i wish good and health for you

  • @DanielK48
    @DanielK48 6 лет назад

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

  • @delfinotachi1686
    @delfinotachi1686 3 года назад

    Thank you so much for this video.

  • @Andrei-ds8qv
    @Andrei-ds8qv 6 лет назад

    THAT IS AWESOME MAN!! THANKS!

  • @dhakprasadupreti6249
    @dhakprasadupreti6249 4 года назад

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

  • @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

  • @anganhvo3071
    @anganhvo3071 7 лет назад

    tkx guy, this is so great

  • @bigsmoke5930
    @bigsmoke5930 2 года назад

    Thank you very much Sir! Amazing

  • @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.

  • @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

  • @nimesh519
    @nimesh519 6 лет назад

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

  • @vinhvo4816
    @vinhvo4816 4 года назад

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

  • @gloriabukachi1
    @gloriabukachi1 6 лет назад

    great video, thank you so much!

    • @AwaMelvine
      @AwaMelvine  6 лет назад

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

  • @xharemslive7143
    @xharemslive7143 2 года назад

    Thnx bro it helped a looooot

  • @marcoantonio7634
    @marcoantonio7634 7 лет назад +6

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

  • @Er.MeetPatel
    @Er.MeetPatel 4 года назад

    Amazing video thank you for code

  • @bgmibrutal4347
    @bgmibrutal4347 7 лет назад

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

  • @shwetagupta2662
    @shwetagupta2662 6 лет назад

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

  • @tigger2581
    @tigger2581 4 года назад

    great tutorial dude

  • @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')";

  • @kriziacarissepangan1590
    @kriziacarissepangan1590 3 года назад

    Thanks, bruuh! Moree!

  • @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.

  • @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.

  • @harrisleshaba2348
    @harrisleshaba2348 7 лет назад

    good work man keep it up

  • @technest4013
    @technest4013 4 года назад

    awosome well done dude

  • @josephat8824
    @josephat8824 2 года назад

    You deserve my sub bro

  • @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

  • @bhagyashreegaonkar9191
    @bhagyashreegaonkar9191 8 лет назад

    Its good, I like your tutorial
    Thank you

    • @vineshsave652
      @vineshsave652 7 лет назад

      pls help meeeeeeeeeeeeeeeeeeeeeeeeeeeeee

  • @yasee3fjdje
    @yasee3fjdje 4 года назад

    thank you
    you are the best !!

  • @josephat8824
    @josephat8824 2 года назад

    great job thx dear bro!

  • @khanjanbarad6036
    @khanjanbarad6036 6 лет назад

    you are a lifesaver

  • @elaandreaaparecio2989
    @elaandreaaparecio2989 6 лет назад

    Thanks! this helps a lot! :D

  • @isaacnewtonmmary3377
    @isaacnewtonmmary3377 8 лет назад +1

    Big up thanks brother!

  • @ashwatirao3036
    @ashwatirao3036 4 года назад +1

    Thank you sooooo much!!!!!!

  • @vuongkhaikiet2264
    @vuongkhaikiet2264 7 лет назад

    thanks very much for your lesson

  • @TheDLuigi
    @TheDLuigi 8 лет назад +1

    Thank you so much!
    Question : everytime I refresh the page, it uploads the same image again to the database, is there anyway to avoid that?
    Keep up the great work!

    • @TheDLuigi
      @TheDLuigi 8 лет назад +1

      Also, when I try to retrieve the images, they are all broken images.

    • @iJuce
      @iJuce 4 года назад

      i think just by adding header("Location: (location to same php file or redirected file))"); should fix the problem

    • @rise5544
      @rise5544 4 года назад

      @@iJuce what do you mean

  • @manailii2
    @manailii2 5 лет назад

    I am big fan for yoooouuuuuu maaaaaaaaaannnn

  • @maciejwisniewski5026
    @maciejwisniewski5026 6 лет назад

    You very help me. Thank you ;)

  • @puneetgandhi5740
    @puneetgandhi5740 6 лет назад

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

  • @mahendrant9306
    @mahendrant9306 8 лет назад

    u r awesome dude.....

  • @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.

  • @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?

  • @satyamsurajmaurya3818
    @satyamsurajmaurya3818 8 лет назад

    thanks bro really helpful

  • @ianthehunter3532
    @ianthehunter3532 5 лет назад +2

    I got everything working, **BUT** the image doesn't load, it's just like before you inserted image/ near the end of the video

  • @kishankhant8011
    @kishankhant8011 6 лет назад

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

  • @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!