?
Solved

PHP Code Link Question

Posted on 2014-07-30
2
Medium Priority
?
399 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 111

Accepted Solution

by:
Ray Paseur earned 2000 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

Video: Liquid Web Managed WordPress Comparisons

If you run run a WordPress, you understand the potential headaches you may face when updating your plugins and themes. Do you choose to update on the fly and risk taking down your site; or do you set up a staging, keep it in sync with your live site and use that to test updates?

Question has a verified solution.

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

Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
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…
Suggested Courses

762 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