Image update in php

broken image

Before storing it in the database I append data:image/'.$imageFileType.' base64, text with base64 value. In PHP base64_encode() method is been used for base64 conversion. name, path, and not require to store the image on your server.

broken image

You don’t need to store image reference in the Database table e.g. You can store the full image in the Database table by converting it into the base64 format. Select the name or path of the image which you have stored in the database table and use it in the image source. `id` int(11) NOT NULL PRIMARY KEY AUTO_INCREMENT,Ĭreate a new config.php file for database configuration.

broken image

In the example, I am using images table for storing data.