Skip to content
Advertisement

cant update image but can update the details

I’m trying to update the supplier details along with the image. The details are being updated to the database but the image is not getting updated – the old pic is still on the database. No error is shown as well. The code looks fine to me. pls have a look and help me out. I’m also including the supplier edit page code for better understanding. This same code works perfectly for my other page but on this page, it’s not uploading the new image to the file and also the database.

Code.php:

JavaScript

Supplier_edit.php

JavaScript

Advertisement

Answer

add enctype=”multipart/form-data” to your form

JavaScript
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement