user4fun Posted July 4, 2007 Share Posted July 4, 2007 This method works $Website="www.mydomain.com";$Llink="image/myimage.jpg";echo '<td><img src="http://' . $Website ."/". $Llink.'" width="50" height="30" /></td>'; The exact Same Code (kinda) does not work. Why? while($row = mysql_fetch_array($result)) {$Website=$row['website'];$Lline=$row['Lline'];echo '<td><img src="http://' . $Website .'/'. $Lline.'" width="50" height="30" /></td>'; The Second codes read the $row['Website'] value and it ignores the $row['Lline']What is the difference and why does the second one not work? Link to comment Share on other sites More sharing options...
Lulzim Posted July 4, 2007 Share Posted July 4, 2007 as I can see you are not careful with variable names, at some place they are uppercase, somwhere else lowercasecheck the columun in name in database at this line$Lline=$row['Lline'];What is the columun name Lline or lline? Link to comment Share on other sites More sharing options...
user4fun Posted July 5, 2007 Author Share Posted July 5, 2007 is is all Llinethe Llink was an accident.either way when you make it both Lline the code still does not work, the second one that is. Link to comment Share on other sites More sharing options...
justsomeguy Posted July 5, 2007 Share Posted July 5, 2007 The second piece of code is working just fine, PHP won't just ignore data. If it's coming out blank, then the value in the database is blank. You can use print_r($row) to see the values of all fields. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.