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...

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.