Reputation: 9
How can i make this picture a link using this coding format?
if($row['name'] !== "") {
echo "<br/><img src='../login/image/";
echo $row['name'];
echo "' style='width: 300px;height: 400px;'>";
Upvotes: 0
Views: 79
Reputation: 23892
You can do it like this, you also don't need all the echo
s.
if($row['name'] !== "") {
echo "<br/><a href='link'><img src='../login/image/" . $row['name'] . "' style='width:300px; height:400px;'></a>";
Upvotes: 1