0

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>";
  }
2
Contributors
2
Replies
15
Views
3 Years
Discussion Span
Last Post by joseph.lyons.754
0

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>";
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.