Jump to content

image as a link .....


thriller372

Recommended Posts

Hi,I have an image url stored in a database, I can display the image no problem using this code:

 

 echo '<td><img src="'.$row['thumb'].'"></td>';

 

I am trying to use a variable as a link when you click on the image, as so:

 

<a href='showthumb.php?thumb=$clientthumb'></a>

 

I can use the image as a link but the $clienthumb variable does not show the value of the variable, for example:

 

I get the image with a link of showthumb.php?thumb=$clientthumb

but I need

The image with a link of showthumb.php?thumb=1 (the number one is $clientthumb value)

 

echo '<td><img src="'.$row['thumb'].'"></td>';

<a href='showthumb.php?thumb=$clientthumb'></a>

Link to comment
https://forums.phpfreaks.com/topic/294934-image-as-a-link/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.