I have $row["vLink"] vlink(varchar(200)) is a URL address I got from MySQL. But when I’m printing vLink looks in text form not a real link. How can make a clickable IMG link with using vLink?
while ($row = mysqli_fetch_assoc($result)) {
echo $row["vLink"];
}
Advertisement
Answer
To make clickable image
echo '<a href="'.$row["vLink"].'">'.' <img src="img_girl.jpg" alt="Girl in a jacket"> '.'</a>';
When you will click on image it will re-direct you to that link( $row[“vLink”] )