emediastudios Posted October 13, 2007 Share Posted October 13, 2007 There seems to be an error in my code, Can someone spot it? Thanks <?php if (!empty($row_Recordset1['photo'])) { echo <img src="../images/<?php echo $row_Recordset1['photo']; ?>" alt="image" width="150" /> else { echo ""; } ?><br /> Link to comment https://forums.phpfreaks.com/topic/73060-solved-small-problem/ Share on other sites More sharing options...
GingerRobot Posted October 13, 2007 Share Posted October 13, 2007 Try changing the echo line to: echo '<img src="../images/'.$row_Recordset1['photo'].'" alt="image" width="150" />'; Link to comment https://forums.phpfreaks.com/topic/73060-solved-small-problem/#findComment-368453 Share on other sites More sharing options...
irkevin Posted October 13, 2007 Share Posted October 13, 2007 also you'll notice that u missed a bracket just before the else like this if (!empty($row_Recordset1['photo'])) { echo "<img src>"; } <--- you missed this else{ ""; } Link to comment https://forums.phpfreaks.com/topic/73060-solved-small-problem/#findComment-368460 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.