I have stories (some with images) displayed through a repeating region. Data of stories and image paths from MySql.
Stories with no image have a blank image frame next to it, but only on MS Explorer. I thought I had this resolved using a variable style. All Mac browsers look fine so dose Win FireFox.
What I want to do is write an "if" statement pertaining to the whole image script, but can't figure it out. Something like? Except I'd like it to work.:)
<?php
if($row_rsSports['imagepath']=="") {
} else {
<a href="<?php echo $row_rsSports['imagepath']; ?>" rel="lightbox[]" title="<?php echo $row_rsSports['imagecaption']; ?>"> <img style="" src="<?php echo $row_rsSports['imagepath']; ?>" class="<?php echo $class; ?>" /> </a> ;
}
?>
my existing code
Style
.imgright1{
float: right;
padding-left: 5px;
padding-bottom: 5px;
padding-top: 5px;
max-width: 50px;
max-height:80px;
border: 0px;
Repeat Region
<?php do { ?>
<p align="center" class="style29"><?php echo $row_rsSports['Headline']; ?></p>
<p align="justify" class="style17"><strong>
<?php
if($row_rsSports['imagepath']=="") {
$class="noclass";
} else {
$class="imgright1";
}
?>
<a href="<?php echo $row_rsSports['imagepath']; ?>" rel="lightbox[]" title="<?php echo $row_rsSports['imagecaption']; ?>"> <img style="" src="<?php echo $row_rsSports['imagepath']; ?>" class="<?php echo $class; ?>" /> </a>
<?php echo $row_rsSports['Bold1']; ?></strong><?php echo $row_rsSports['SpStory1']; ?><br />
<strong><?php echo $row_rsSports['Bold2']; ?></strong> <?php echo $row_rsSports['SpStory2']; ?></p>
<p align="justify" class="style17"> </p>
<?php } while ($row_rsSports = mysql_fetch_assoc($rsSports)); ?><p> </p>
Thank You