Hi guys, I have a little problem with showing images from database. I’m using this code, but it only shows one image.
[php]<?php
$con = mysqli_connect($host, $username, $password , $database)
or die(‘Error connecting to MySQL server.’);
$query = "SELECT * FROM cms_news
";
$data = mysqli_query($con, $query);
$row = mysqli_fetch_array($data);
echo ’
Latest news
<a href="/hotel?room=’.$row[“room_id”].’" class=“news-header__link news-header__banner”>
<img src="’.$row[“image”].’" alt="’.$row[“image”].’" class=“news-header__image news-header__image–featured”>
<img src="’.$row[“thumbnail”].’" alt="’.$row[“thumbnail”].’" class=“news-header__image news-header__image–thumbnail”>
<a href="/hotel?room=’.$row[“room_id”].’" class=“news-header__link news-header__wrapper”>
‘.$row[“title”].’
‘.$row[“description”].’
'; ?>[/php]