Put Image Base64 and Image SRC on Dompdf From MYSQL using PHP | dompdf PHP mysql

Put Image Base64 and Image SRC on Dompdf From MYSQL using PHP | dompdf PHP mysql

Nexample

3 года назад

687 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@ramsesfernandez4854
@ramsesfernandez4854 - 11.03.2021 01:29

Hello, I was trying to solve my problem with your video and it helped me a lot since I finally managed to show images from mysql. But the problem arises when trying to show several images since the same image is always repeated.

This is what I am trying to do to show the images following your video, which effectively shows the number of images that I have saved in the database but always repeating the first one found in the while. I wish you could help me ... thanks in advance
-------------------------------------------------------This is the code ------------------------------------------------------------------
$database=new mysqli("localhost","root","","detcomhome");
$img = '';
$select=$database->query("SELECT * FROM images_homes WHERE id_home = '$lastidhome'");

if($select -> num_rows > 0){
while($dataimg = $select -> fetch_assoc()){
$imgs = $dataimg['imagecode'];
$img .= $imgs;
echo "<img src='data:image;base64,.$img.' width='150px' height='150px' >";
}}

Ответить
@tech-rs1966
@tech-rs1966 - 10.03.2021 17:18

Nice video

Ответить