Upload Image With AJAX, PHP & MySQL With Preview Image Before Upload JavaScript

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

КОМЕНТАРІ • 16

  • @luckyyunque8634
    @luckyyunque8634 Рік тому +1

    making programming very simple is your trade sir i learned a lot in your video please upload more :)

    • @DavidGTech
      @DavidGTech  Рік тому +1

      Thank you so much for your kind words! It's great to hear that the video was helpful and that you learned a lot from it. I'll definitely keep your feedback in mind and work on creating more content that simplifies programming.

  • @jayagopal4338
    @jayagopal4338 Рік тому +1

    You save my time.

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

      Great!!! Thanks for watching!!!

  • @InspireHour
    @InspireHour 2 роки тому +1

    thanks bro

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

      You're welcome!!! Thanks for watching...

  • @yudhistirasatriatama1194
    @yudhistirasatriatama1194 2 роки тому +1

    hello sir, if the query is customer's data and image, how is the script? please help me sir

  • @candrasniper3404
    @candrasniper3404 2 роки тому +1

    This preview thumbnail before upload, is so simple and no need jquery.form.min.js. Awesome. Does the console results no error or warning?

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

      Yeah, no error, you can check it

    • @candrasniper3404
      @candrasniper3404 2 роки тому +1

      @@DavidGTech Yes, I've tried it. It works great. You have made it simple. Awesome logic. Thanks a lot.
      Maybe you could make a video about how to make the image file which has been cropped, it will be automatically no change in its result's orientation (especially when we upload the source image with the potrait orientation). I have tried many couple tricks, but ended by I rotate it manually after it cropped. Because it always changing. You will help another people too, because it also happens to them. Just for your video idea.

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

      Thank you for your great idea!

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

    Ive copied this code with a fine tooth comb and it still doesn't pass any data to my php script, it is posting to it as Ive sent strings and it returns them fine?

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

      Also even though the function is just below the onclick event when clicked my console shows an error submitData is not defined, could you help?

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

      Sorry to hear that you're experiencing issues with the code. Let's try to troubleshoot this together. First, make sure that you've followed the steps in the video carefully, including any HTML, JavaScript, and PHP code. Double-check for any typos or errors in the code, as even small mistakes can cause issues.
      Here are a few steps to help you debug the problem:
      - Ensure that your PHP script is properly configured and that the file upload path and permissions are set correctly.
      - Check your JavaScript code to make sure the AJAX request is formed correctly and that the data is being sent as expected.
      - Verify that your HTML form has the correct structure and that the file input field is named and formatted as in the video.
      If you still can't figure out the issue, feel free to provide more details or code snippets, and I'll do my best to assist you further.

  • @parmarfamily6311
    @parmarfamily6311 8 місяців тому +1

    formData is not constructor this a error solution

    • @DavidGTech
      @DavidGTech  7 місяців тому

      Hi @parmarfamily6311,
      The error "formData is not a constructor" usually occurs if you're trying to use FormData incorrectly. Make sure you're using it properly like this: var formData = new FormData(formElement);. Double-check your code and let me know if you need more help! 👍