Daniyal Masood
Daniyal Masood

Reputation: 21

how to add url behind this image

Hi this is custom PHP Admin Panel. I want to add URL Link in Admin Panel and attach each link for each image. Below is the code to add image

                                    while($client_images = mysql_fetch_array($client_images_query)){
                                    ?>
                                    <td class="response" style="width: 25%;">
                                    <img class="img-responsive" style="max-width: 40%;" src="uploads/<?php echo $client_images['image']; ?>" alt="" />

Upvotes: 2

Views: 48

Answers (2)

Shyamali
Shyamali

Reputation: 349

<td class="response" style="width: 25%;">
<a href="Your url">
<img class="img-responsive" style="max-width: 40%;" src="uploads/
<?php echo $client_images['image']; ?>" alt="" />
</a>

Try this

Upvotes: 0

Nishant Nair
Nishant Nair

Reputation: 2007

You can surround the tag with

 <a href="http://www.google.com"><img class="img-responsive" style="max-width: 40%;" src="uploads/<?php echo $client_images['image']; ?>" alt="" /></a>

Upvotes: 2

Related Questions