Results 1 to 4 of 4
  1. #1
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Can figure out why image is not showing
    Hi,

    A friend gave me a php script which pulls random products from my db table on my domain and displays them. Everything seems to be working, except this code:

    echo "<td width=\"100%\"><a href=\"".$Link."\" target=\"_new\"><img src=\"$BigImage\" align=\"left\" width=\"150\" height=\"150\" border=\"0\" alt=\"$Name\"></a></p><br>\n";

    That's just part of the code to display the image and use it as part of a link to the merchant's site. When it displays in the browser, it shows the "place holder" box with a blank outline and the little red "x" where the image should be. When I use "View Source" in my browser, this is what's showing up for that code:

    <a href="http://www.shareasale.com/m-pr.cfm?merchantID=XXXX&userID=XXXX&productID=XXXX" target="_new"><img src="" align="left" width="150" height="150" border="0" alt="Name of Product"></a></p><br>

    (NOTE: I have "Xed" out the merchant ID, product ID, and substituted "Name of Product" in the alt tag for privacy purposes.)

    I'm ridiculously frustrated by my lack of knowledge regarding HTML, XHTML, MySQL, and PHP, or I would probably be able to figure out why the source says <img src="" instead of showing a link to the image. (But I'm studying and learning!)

    I've checked my database table and the "BigImage" field is there, is populated. If I copy and paste the URL under "BigImage" field into my browser, they go perfectly to the image at the merchant's site every time.

    Heck, if I click on the blank image/placeholder in my browser, the link goes to the merchant AND shows the image on the merchant's site just fine.

    Probably a simple answer.

    Thanks in advance to anyone who can help!

    Gary Speer

    BIG OOPS FOR ME!

    I went back to the instructions my friend sent along with the script, and by golly if I didn't find a line earlier in the script which needed to be uncommented.

    Works fine now. sorry about that!!

    EDITED TO ADD BIG OOPS FOR ME!
    Last edited by writerguy; September 11th, 2006 at 01:27 PM.

  2. #2
    Lite On The Do, Heavy On The Nuts Donuts's Avatar
    Join Date
    January 18th, 2005
    Location
    Winter Park, FL
    Posts
    6,930
    you left out the . before and after the $BigImage var.

  3. #3
    ABW Veteran Mr. Sal's Avatar
    Join Date
    January 18th, 2005
    Posts
    6,795
    Probably a simple answer.


    ...

  4. #4
    ABW Ambassador writerguy's Avatar
    Join Date
    January 17th, 2005
    Location
    Springfield, Missouri, USA
    Posts
    3,248
    Uh, Okay, now it's working. But if I put the . in before and after $BigImage, it breaks again.

    Don't understand why, but it works just fine for me WITHOUT the . so it'll have to go without.

    Gary (feeling a bit like a big dummy for not being able to read and follow directions to start with!!)

  5. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Duplicate categories and no image showing
    By mayfly in forum WebMerge (Fourthworld.com)
    Replies: 7
    Last Post: March 16th, 2007, 04:50 PM
  2. Keep your images from showing up in Google's Image Library
    By ~Michelle in forum Midnight Cafe'
    Replies: 2
    Last Post: February 26th, 2004, 12:20 PM
  3. How to fix an image with a '\' in image url
    By ahugedeal in forum Programming / Datafeeds / Tools
    Replies: 9
    Last Post: September 24th, 2003, 06:29 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •