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 /> Quote 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" />'; Quote 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{ ""; } Quote Link to comment https://forums.phpfreaks.com/topic/73060-solved-small-problem/#findComment-368460 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.