Solved

PHP Code Link Question

Posted on 2014-07-30
2
388 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 109

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

786 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