can someone please look at my code below and tell me why it is only working half-way? It is only displaying radio buttons and seats for numbers 71, 73, 75, 77, 79, 81, 83, and 85.....and it is printing seat # 76 since that is the one in the database between seats 81 and 83....why is this happenening and HOW can i correct it???


$sql = "SELECT seat, alias FROM attendees"; $sql_result = mysql_query($sql,$connection) or die("Couldn't execute query.");

$row = mysql_fetch_array($sql_result);
$myseat = array('70','71','72','73','74','75','76','77','78','79','80','81','82','83','84');
$i = 70;


foreach ($myseat as $seat)
{
if (($seat) == ($row[0]))
{
if ($i <= 84)
{
?>
<td align="center" valign="top" class="red"><a class="sold" onMouseOver="self.status='SOLD TO <?php echo $alias; ?>'; return true;" onMouseOut="self.status=' '; return true;"><?php print $row[0]; ?></td>
<?php
}
}


else
{
if ($i <= 84)
{
?>
<td align="center" valign="top" class="green"><input type="radio" name="seat" value="<?php print $i++; ?>"><nobr /><font class="avail"><?php print $i++; ?></td>
<?php
}
}
}
?>



================================================ Jay Fitzgerald, Design Director - Certified Professional Webmaster (CPW-A) - Certified Professional Web Designer (CPWDS-A) - Certified Professional Web Developer (CPWDV-A) - Certified E-Commerce Manager (CECM-A) - Certified Small Business Web Consultant (CWCSB-A)

Bayou Internet - <http://www.bayou.com/>http://www.bayou.com
Toll Free: 888.30.BAYOU (22968)
Vox: 318.338.2034 / Fax: 318.338.2506
E-Mail: <mailto:[EMAIL PROTECTED]>[EMAIL PROTECTED]
ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
================================================

Reply via email to