JTapp Posted May 6, 2008 Share Posted May 6, 2008 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... Quote Link to comment Share on other sites More sharing options...
Fadion Posted May 6, 2008 Share Posted May 6, 2008 If im getting this right, u need: <?php $imagesFolder = 'images/companies/'; echo "<img src='" . $imagesFolder . $row['companyID'] . ".jpg' />"; ?> Quote Link to comment Share on other sites More sharing options...
JTapp Posted May 6, 2008 Author Share Posted May 6, 2008 Worked beautifully! Thanks for taking the time! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.