antonyjohn Posted August 3, 2007 Share Posted August 3, 2007 hai friends i have one problem in my programming.there is a table containing some details of the product with its image.. in view section in my php page ,i need to show this image and the rest of the fields in the table in a row... plzzz help me out on how to do it Link to comment https://forums.phpfreaks.com/topic/63206-need-help-with-image-display-from-database/ Share on other sites More sharing options...
peterbarone Posted August 3, 2007 Share Posted August 3, 2007 I do something like this and it works well for me. Hope it help <img src=\"/imagesfolder/$row[imagename]\" > Link to comment https://forums.phpfreaks.com/topic/63206-need-help-with-image-display-from-database/#findComment-315025 Share on other sites More sharing options...
antonyjohn Posted August 3, 2007 Author Share Posted August 3, 2007 hai friends i have one problem in my programming.there is a table containing some details of the product with its image.. in view section in my php page ,i need to show this image and the rest of the fields in the table in a TABLE Row... plzzz help me out on how to do it Note: it shuld be displayed in a table Link to comment https://forums.phpfreaks.com/topic/63206-need-help-with-image-display-from-database/#findComment-315042 Share on other sites More sharing options...
GingerRobot Posted August 3, 2007 Share Posted August 3, 2007 It'll look something along the lines of: <table> <tr><td>Var1</td><td>Var2</td><td>Image</td></tr> <?php $sql = "SELECT * FROM `yourtable`"; $result = mysql_query($sql) or die(mysql_error()); while($row = mysql_fetch_assoc($result)){ echo '<tr><td>'.$row['var1'].'</td><td>'.$row['var2'].'</td><td><img src="images/'.$row['images'].'" /></td></tr>'; } ?> </table> Link to comment https://forums.phpfreaks.com/topic/63206-need-help-with-image-display-from-database/#findComment-315049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.