?
Solved

Hyperlink Recordset Image In PHP. Is there a way to do this?

Posted on 2010-08-16
2
Medium Priority
?
419 Views
Last Modified: 2013-12-13
Is there a way to hyperlink a recordset with an image using php?
I have attached two codes, the second one uses asp code and it works fine.

I have to now use mysql server that uses php. Can I accomplish this using php similar to what I did using ASP?

The first code is php with the field 'datasheet' actually being a hyperlink in my database table.
The field Type in the MYSQL database is 'Char'.
(Example: http://www.escomponents.com)
Thank you...
Rick

<td><?php echo $row_ESCAlternatives['DataSheet']; ?></td>


<a href="<%=(Recordset1.Fields.Item("DataSheet").Value)%>" target="_blank" class="style7"><span class="style6 style1 Forms"><img src = "/images/photoshop/tiny-pdf-page.gif" width="16" height="16" border="0"></span></a>

Open in new window

0
Comment
Question by:ES-Components
[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 11

Accepted Solution

by:
Pieter Jordaan earned 2000 total points
ID: 33447204
Hi

Yes you can.



<?php
echo '<td><a href="'.$row_ESCAlternatives['DataSheet'].'" target="_blank" class="style7"><span class="style6 style1 Forms"><img src = "/images/photoshop/tiny-pdf-page.gif" width="16" height="16" border="0"></span></a></td>';
?>
<a href="<%=(Recordset1.Fields.Item("DataSheet").Value)%>" target="_blank" class="style7"><span class="style6 style1 Forms"><img src = "/images/photoshop/tiny-pdf-page.gif" width="16" height="16" border="0"></span></a>

Open in new window

0
 

Author Closing Comment

by:ES-Components
ID: 33447880
Thank you very, very, much!!!!
I am certainly not a PHP expert at all. Took me a few minutes to get your code to work. (Cut/Paste
doesn't always leave the quotes, dahses, etc where they are supposed to be.)

It works perfect!

Thank you for your quick response.
Rick
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
There are times when I have encountered the need to decompress a response from a PHP request. This is how it's done, but you must have control of the request and you can set the Accept-Encoding header.
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…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …
Suggested Courses

771 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