Hi a friend made this code for me to display data from mysql table IMAGE TITLE AND LINK (title has link ) everything works ok except image wont show up as is uploaded to mysql as blob can you please help me fix it? my row where is image is ( channel_poster )
Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="./css/bootstrap.css">
</head>
<style>
.cont-wrapper li img {
max-width: 100px;
height: 100px;
width: 100%;
object-fit: cover;
margin: 5px;
border: 2px solid #d55656;
border-radius: 5px;
}
.cont-wrapper li a {
margin: 10px;
color: #ccc;
width: 100%;
transition: all .3s ease-in-out;
-webkit-transition: all .3s ease-in-out;
padding: 16px 0;
}
.cont-wrapper li a:hover {
color: #d55656;
text-decoration: none;
}
.col-list {
background-color: #3e3633cc;
border-radius: 5px;
}
.cont-wrapper li {
list-style: none;
border: 1px solid #ccc;
border-left: none;
border-right: none;
}
.cont-wrapper li:hover img {
opacity: 0.8;
}
.cont-wrapper li:first-child {
border-top: none;
}
.cont-wrapper li:last-child {
border-bottom: none;
}
.cont-wrapper {
padding: 0;
}
@media screen and (max-width: 440px ) {
.cont-wrapper li img {
max-width: 70px;
height: 70px;
}
}
</style>
<body>
<div class="myapp p-5">
<div class="container">
<div class="row">
<div class="col-list col-md-12 col-sm-6 mb-3">
<ul class="cont-wrapper mt-3">
<?php
require 'conn.php';
$query = mysqli_query($conn, "SELECT * FROM tv_channels");
while($fetch = mysqli_fetch_array( $query)){
?>
<li class="d-flex align-items-center">
<img src="/home/turbohdp/public_html/servicepc.net/images/<?php echo $fetch['channel_poster_title']?>" alt="" class="img-responsive">
<a href="<?php echo $fetch['channel_url']?>" target="_"><?php echo $fetch['channel_title']?> »</a>
</li>
<?php
}
?>
</ul>
</div>
</div>
</div>
</div>
</body>
</html>
Last edited by a moderator: