Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Having trouble displaying an image/filename.jpg via a link in mysql database

Explorer ,
Jul 15, 2015 Jul 15, 2015

I have set up a column in msql database for a link to my images direction of my website. I set this up as a text field with no character length. In that field I have put only the picture file name, example: TestPic.jpg.

in my code I have put the following:

<img src="images/"<?php echo $row_DisplayDetails['PicLink']; ?> width="530" height="310" alt=""/>

I've tried many altered versions of this statement, but get only a picture frame, square with a tiny generic picture icon. If I reference the filename directly, the picture shows up.

Can someone PLEASE help me out.

TOPICS
Server side applications
1.2K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Explorer , Jul 15, 2015 Jul 15, 2015

Thanks, not only were my quotes not in the right place, I made it simple by including in my database field the "image/picname.jpg" and excluding it in my code.

Thanks for responding!!!

Translate
Enthusiast ,
Jul 15, 2015 Jul 15, 2015

Change your code to:

<img src="images/<?php echo $row_DisplayDetails['PicLink']; ?>" width="530" height="310" alt=""/>

Your PHP code is currently outside of the src quotes.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jul 15, 2015 Jul 15, 2015
LATEST

Thanks, not only were my quotes not in the right place, I made it simple by including in my database field the "image/picname.jpg" and excluding it in my code.

Thanks for responding!!!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines