Solved

PHP Code Link Question

Posted on 2014-07-30
2
386 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
ID: 40229031
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
ID: 40229035
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Synchronizing CSS load 3 29
How can i modify my File download link ? 6 49
stop navigation from wrapping 7 57
How to avoid jquery conflicts in Wordpress ? 4 24
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
Although it can be difficult to imagine, someday your child will have a career of his or her own. He or she will likely start a family, buy a home and start having their own children. So, while being a kid is still extremely important, it’s also …
Any person in technology especially those working for big companies should at least know about the basics of web accessibility. Believe it or not there are even laws in place that require businesses to provide such means for the disabled and aging p…
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

920 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

16 Experts available now in Live!

Get 1:1 Help Now