i just want to display a simple HTML message...
<p>Do you want to advertise your restaurant in the town of Alabaster?</p>
..without using the table if there are no records - at the moment i'm obviously getting the table column headings and the table when there are no records
The number of records returned is $totalRows_Recordset1
so i know you have to do an if else constraint
so
Code: Select all
<?php if ($totalRows_Recordset1 > 0)i thought i could just encapsulate all the code but i keep getting errors...
i managed to do a few lines...
such as
Code: Select all
echo "<table width=580 border=0 cellspacing=0 cellpadding=0>";Code: Select all
<?php do { ?>Code: Select all
<table width="580" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><h2>Restaurant</h2></td>
<td><h2>Description</h2></td>
<td><h2>Report</h2></td>
</tr>
<?php do { ?>
<tr <?php
// technocurve arc 3 php bv block2/3 start
echo " style=\"background-color:$color\"";
// technocurve arc 3 php bv block2/3 end
?>>
<td><a href="http://<?php echo $row_Recordset1['Website']; ?>" target="_blank" rel="nofollow"><?php echo $row_Recordset1['Restaurant']; ?></a></td>
<td><?php echo $row_Recordset1['Description']; ?></td>
<td><a href="mailto:reportabuse@foobar.com?subject=<?php echo $row_Recordset1['URL']; ?>">Report Abuse</a></td>
</tr>
<?php
// technocurve arc 3 php bv block3/3 start
if ($color == $color1) {
$color = $color2;
} else {
$color = $color1;
}
// technocurve arc 3 php bv block3/3 end
?>
<?php } while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
<p> </p>
<p>Do you want to <a href="../advertise-your-restaurant.php">advertise your restaurant</a> in the town of Alabaster?</p>