• 1

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

PHP – Display a Base64 Image From Database in HTML

Hello, i have a simple website in PHP i have stored all images in MySQL database in Base64. now i want to show them in HTML. how i can do that..

Display the saved base64 image in HTML

$savedBase64Image = $database->getBase64Image(); // it is just a simulation function

echo '<img src="data:image/jpeg;base64,' . $savedBase64Image . '">';
  • 1
Reply Report

Warm tip !!!

This article is reproduced from Stack Exchange / Stack Overflow, please click

Trending Tags

Related Questions