I want to pull the image name from the database and insert it to the folder directory path using php.

I am wondering is this possible and if so how? Ive attempted it a few different ways but i can't figure it out?

while($row = mysql_fetch_array($result))
  {
  echo "<tr>";

 This Line ---> echo "<td> <img src='/images/ <?php '. $row['images_name'] .''>" "</td>"; <---

  echo "<td>" . $row['product_name'] . "</td>";
  echo "<td>" . $row['price']. "</td>";
  echo "<td>" . $row['details'] . "</td>";

  echo "</tr>";
  }
Member Avatar for diafol

I want to pull the image name from the database and insert it to the folder directory path using php.

echo "<td> <img src='/images/ <?php '. $row['images_name'] .''>" "</td>"; 

Seems you've got your knickers in a twist with your quotes...

echo "<td><img src='/images/{$row['images_name']}'></td>";
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.