The following;
<?php if ($totalRows_DetailRS1 > 0) { // Show if recordset not empty ?>
<img src="eventImages/sponsor/<?php echo $row_DetailRS1['event_sponsor_img2']; ?>" alt="<?php echo $row_DetailRS1['event_sponsor_img2']; ?>" id="smpictures" />
<?php } // Show if recordset not empty ?>
results in a ? marked box (no picture found) when the database does not have an image for that event. How do I make it so nothing shows if nothing is in the database for that event?
And why would this not work? (It doesn't)
<?php
if ( $row_rsDetailRS1['event_sponsor_img2'] == NULL) {
echo "";
}
else {
echo "<img src="eventImages/sponsor/<?php echo $row_DetailRS1['event_sponsor_img2']; ?>" alt="<?php echo $row_DetailRS1['event_sponsor_img2']; ?>" id="smpictures" />";
}
?>
Thank you in advance for any help.