Reputation: 33
I have this code in my php dynamic table
<?php echo'<a href="http://'.$row_rsInventory['PHOTO'].'"><img src="../images/a-camera-icon.png">'.$row_rsInventory['PHOTO'].'</a>'; ?>
When the code runs it displays the link as an image and the text as a hyperlink in the PHOTO field. What do I need to change so that it just shows the link as an image in the PHOTO field. I appreciate any help on this.
Upvotes: 1
Views: 408
Reputation: 977
Remove the anchor text .$row_rsInventory['PHOTO']
Use either of the code below
<a href="http://<?php echo $row_rsInventory['PHOTO']; ?>"><img src="../images/a-camera-icon.png"></a>
<?php echo'<a href="http://'.$row_rsInventory['PHOTO'].'"><img src="../images/a-camera-icon.png"></a>'; ?>
Upvotes: 0
Reputation: 133360
Just remove the text you have for anchor .$row_rsInventory['PHOTO'].
this way
<?php echo'<a href="http://'.$row_rsInventory['PHOTO'].'">
<img src="../images/a-camera-icon.png">
</a>'; ?>
Upvotes: 2