How to save image in Database using PHP ?

By | March 19, 2016

Step 1: First of all Convert image to binary.

 
<?php
$imageURL ='YOUR_IMAGE_URL'; //or you can upload
$convertedImage = base64_encode(file_get_contents($imageURL));
/** Now store $convertedImage in Database using database functions.**/
 
?>

Leave a Reply

Your email address will not be published. Required fields are marked *