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

Image from a URL database record

New Here ,
Jul 16, 2013 Jul 16, 2013

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
1.1K
Translate
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

correct answers 1 Correct answer

Enthusiast , Jul 17, 2013 Jul 17, 2013

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>


Translate
Enthusiast ,
Jul 17, 2013 Jul 17, 2013

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>


Translate
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
LATEST

many thanks for taking the time to reply works fine

Translate
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