Jump to content

[SOLVED] Merge data from two fields to create a hyperlink?


JTapp

Recommended Posts

Yeah.. umm.. I might be dreaming.  Here is a fictitious explanation of what I would like to do:

 

field #1 is a company number (field name = companyID)

field #2 is a field that was designed to hold a photo (field name = PhotoPath)

 

I have over 300 company photos stored on my server that are named by the company number (ie, company #1 is named 1.jpg)

I was going to manually go into field #2 and type in a hyperlink to the location of the photo on the server using the following line of code in my PHP:

 

                            echo "<img src='{$row['PhotoPath']}'>";

 

Now I'm wondering if I can have an echo line that combines - location where photos are on my server, Field #1 and .jpg to generate a hyperlink.  Bypassing the need for my field #2.

 

Hope this makes sense...

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.