Jump to content

$row ['$image'] wont display


dazz_club

Recommended Posts

hi guys i am trying to echo out my row that is within an img src, but doesnt seem to work, any pointers??

 

Here is the code;

 

.......$query = "SELECT * FROM  products WHERE name LIKE \"%$search%\" OR category LIKE  \"%$search%\" OR image LIKE  \"%$search%\" OR type LIKE \"%$search%\" ORDER BY product_id  DESC" . " LIMIT $offset, $rowsPerPage" ;
$result = mysqli_query ($connection, $query)or die(mysqli_connect_errno() . "<p>With query:<br>$query");


while ($row = mysqli_fetch_assoc($result)){
echo "<ul style=\"font-weight:bold;list-style:none;padding:4px;margin:0px;\">";
echo "<li>";
echo $row['name'];
echo "</li>";
echo "<li>";
echo $row['type'];
echo "</li>";
echo "<li>";
echo "<img src=\"images/product-images/$row ['$image']\" />";
echo "</li>";
echo "<li>";
echo $row['category']. '<br />';
echo "</li>";
echo "</ul>";
echo "<li><a href=\"#\" style=\"font-size:8pt;color:red;\">more information >></a></li>";
echo "<div style=\"width:100%;height:5px;border-bottom:1px solid black;\"></div>";

 

kind regards

Dazzclub

Link to comment
https://forums.phpfreaks.com/topic/96456-row-image-wont-display/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.