•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 401,680 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,510 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 251 | Replies: 2 | Solved
![]() |
•
•
Join Date: Nov 2007
Location: WASHINGTON, USA
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 1
Please help. I can not figure out how to add a simple link to an image when the image is called through PHP. I have tried making it work a number of ways but I am only intermediate in HTML and still trying to learn PHP basics.
The code is:
Thank you for your help! I just want to use the image as a link to another page.
Respects,
cmgdev
The code is:
php Syntax (Toggle Plain Text)
<div id="mainleft"> <h2>Place CMG Title Header Here</h2> <img src="<?php echo get_bloginfo('url') ?>/serv67/cmg2/img/blog2.jpg" >
Thank you for your help! I just want to use the image as a link to another page.
Respects,
cmgdev
Last edited by peter_budo : Jun 16th, 2008 at 7:57 am. Reason: Keep It Organized - please use [code] tags
cmgdev
cmgdev@content66.com
cmgdev@content66.com
I guess you mean this:
<a href="http://www.google.com">
<img src="<?php echo get_bloginfo('url') ?>/serv67/cmg2/img/blog2.jpg" alt="pic" />
</a>•
•
Join Date: Nov 2007
Location: WASHINGTON, USA
Posts: 7
Reputation:
Rep Power: 0
Solved Threads: 1
Thank you buddylee17. It is sad how easy it is to be so ignorant of something so simple. I was trying to link from inside the php tag and I didn't ever think to place it right outside of it.
I appreciate your help.
I appreciate your help.
cmgdev
cmgdev@content66.com
cmgdev@content66.com
![]() |
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Previous Thread: Including external content
- Next Thread: variable array


Linear Mode