Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Image from a URL database record

New Here ,
Jul 16, 2013 Jul 16, 2013

Copy link to clipboard

Copied

Hi

I am building an online catalog usual stuff product name, link, price, image etc

the product link and image are on another server url's are datatbade cells

no problem with the product link using <td><p><a href="<?php echo $row_Recordset1['productUrl']; ?>" target="_new"> click for more</a></p></td>

But I am having problem with the image have tried

<td><img src="<a href="<?php echo $row_Recordset1['imageUrl']; ?>" ></td>

   <?php echo $row_Recordset1['description']; ?></td>

but just get an image placeholder box even when uploaded to server and previewed in browser

the whole details are

<table border="1">

  <tr>

    <td>name</td>

    <td>productUrl</td>

    <td>imageUrl</td>

    <td>description</td>

  </tr>

  <?php do { ?>

    <tr>

      <td><?php echo $row_Recordset1['name']; ?></td>

     

      <td><p><a href="<?php echo $row_Recordset1['productUrl']; ?>" target="_new"> click for more</a></p></td>

     

     

      <td><img src="<a href="<?php echo $row_Recordset1['imageUrl']; ?>" ></td>

   <?php echo $row_Recordset1['description']; ?></td>

    </tr>

    <?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>

</table>

Thank you

TOPICS
Server side applications

Views

1.1K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jul 17, 2013 Jul 17, 2013

Copy link to clipboard

Copied

You have a href in your image src... I've never seen that before, so I wouldn't know if it's correct syntax.

Change:

<td><img src="<a href="<?php echo $row_Recordset1['imageUrl']; ?>" ></td>

to:

<td><img src="<?php echo $row_Recordset1['imageUrl']; ?>" ></td>

and if you want the image to be clickable:

<td><a href="url-here" border="0"><img src="<?php echo $row_Recordset1['imageUrl']; ?>" ></a></td>


Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jul 18, 2013 Jul 18, 2013

Copy link to clipboard

Copied

LATEST

many thanks for taking the time to reply works fine

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines