Solved

PHP Code Link Question

Posted on 2014-07-30
2
384 Views
Last Modified: 2014-07-30
How can I add a link to http://www.google.com in this code? I'd like for th euser to be able to click on the photo displayed on the page & it take them to google website...thanks


<center>	<img alt="" height="63" src="./includes/myphoto.jpg" width="106" /><br></center>

Open in new window

0
Comment
Question by:wantabe2
2 Comments
 
LVL 108

Accepted Solution

by:
Ray Paseur earned 500 total points
Comment Utility
Wrap the <img> tag in an anchor tag.

<center>	<a href="https://google.com"><img alt="" height="63" src="./includes/myphoto.jpg" width="106" /></a><br></center>

Open in new window

0
 
LVL 13

Expert Comment

by:duncanb7
Comment Utility
Just insert the following into html code area that you want to display the link

Duncan

<?php

$str='<center>	<img alt="" height="63" src="./includes/myphoto.jpg" width="106" /><br></center>';
echo $str;

?>

Open in new window

0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
This article discusses four methods for overlaying images in a container on a web page
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now