johnnyblaze9 Posted April 25, 2008 Share Posted April 25, 2008 I'm using the following code to display user specific photos from a sql database, but it only diplays the file name of the pic and I can't figure out why...can anybody help? $resultsPhotos = mysql_query("SELECT FileName, Description, Created, Variety, YearPlanted, Finca, FieldName FROM vwContactPhoto where ContactID ='{$_SESSION['ContactID']}'") or die(mysql_error()); while($valuesPhotos = mysql_fetch_array($resultsPhotos)) { echo "<img src='trees/" . $valuesPhotos['FileName'] . "'>"; echo '<br /><br />'; Quote Link to comment https://forums.phpfreaks.com/topic/102938-displaying-pictures-from-a-database/ Share on other sites More sharing options...
dptr1988 Posted April 25, 2008 Share Posted April 25, 2008 Have looked at the HTML code that this script generates and verfied the URL is correct and that the image actually exists? Quote Link to comment https://forums.phpfreaks.com/topic/102938-displaying-pictures-from-a-database/#findComment-527327 Share on other sites More sharing options...
johnnyblaze9 Posted April 25, 2008 Author Share Posted April 25, 2008 Yes I have..is there something I am leaving out? Quote Link to comment https://forums.phpfreaks.com/topic/102938-displaying-pictures-from-a-database/#findComment-527340 Share on other sites More sharing options...
moselkady Posted April 25, 2008 Share Posted April 25, 2008 Could you past the result HTML, at least the part that contain the <img> tag? Quote Link to comment https://forums.phpfreaks.com/topic/102938-displaying-pictures-from-a-database/#findComment-527366 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.