Комментарии:
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' >";
}}
Nice video
Ответить