Reaper0167 Posted July 27, 2009 Share Posted July 27, 2009 echo '<a href="viewitem.php?sendto='.$row['id'].'"><img src="' . $row['thumb_1'] . '" border="0" alt=""></a>'; That is what I have on one of my pages on my site. Works great with the rest of the script. I am trying to use that same line on another page on a different site, but it will not display the picture, just a little box with a red x. any ideas? This is what I have so far, but the picture will not display( the line above works great for my first site. But I want to display the same stuff on a different site. echo '<a href="http://www.originalsite.com/viewitem.php?sendto='.$row['id'].'"><img src="' . $row['thumb_1'] . '" border="0" alt=""></a>'; Link to comment https://forums.phpfreaks.com/topic/167563-image-source/ Share on other sites More sharing options...
lonewolf217 Posted July 27, 2009 Share Posted July 27, 2009 are you hotlinking the image, or hosting it locally? Plus this belongs in HTML section Link to comment https://forums.phpfreaks.com/topic/167563-image-source/#findComment-883629 Share on other sites More sharing options...
Reaper0167 Posted July 27, 2009 Author Share Posted July 27, 2009 Here is the full script that works great on the original site. But when I put the script on my other site, the picture will not display. <?php include "connection2.php"; $sql = mysql_query("SELECT id, thumb_1, item_name, description, in_return, user_id FROM member_trades ORDER BY RAND() LIMIT 0, 6"); echo "<table border='0' CELLPADDING=5 STYLE='font-size:16px'>"; while ($row = mysql_fetch_array($sql)) { echo "<tr><td align='center'>"; echo '<a href="viewitem.php?sendto='.$row['id'].'"><img src="' . $row['thumb_1'] . '" border="0" alt=""></a>'; echo "</td><td align='center'>"; echo "".substr($row['item_name'],0,50),""; echo "</td><td align='center'>"; echo substr($row['description'],0,50).'<a href="viewitem.php?sendto='.$row['id'].'" class="view_item"> ...more</a>'; echo "</td><td align='center'>"; echo substr($row['in_return'],0,50).'<a href="viewitem.php?sendto='.$row['id'].'" class="view_item"> ...</a>'; echo "</td><td align='center'>"; echo "</td></tr>"; echo '<tr><td height="19" colspan="4">'; echo '<hr width="550">'; echo "</td></tr>"; } echo "</table>"; mysql_close(); ?> Link to comment https://forums.phpfreaks.com/topic/167563-image-source/#findComment-883630 Share on other sites More sharing options...
lonewolf217 Posted July 27, 2009 Share Posted July 27, 2009 well then you have to think about what is different about the second site. The picture is missing for some reason. Make sure it is on the same local path on both servers. What exactly is the path that is returned from the database ? Link to comment https://forums.phpfreaks.com/topic/167563-image-source/#findComment-883640 Share on other sites More sharing options...
vineld Posted July 27, 2009 Share Posted July 27, 2009 Does the link display correctly? Check your html code to see which values you print from the database. Link to comment https://forums.phpfreaks.com/topic/167563-image-source/#findComment-883642 Share on other sites More sharing options...
Reaper0167 Posted July 27, 2009 Author Share Posted July 27, 2009 the link for the picture displays and it works. the name, description and the return is all text and that displays good. just the picture is not displaying Link to comment https://forums.phpfreaks.com/topic/167563-image-source/#findComment-884213 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.