$alphabet = array('A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q');
$rowCount = 14;
$totalSeats = 238;
$connection = mysql_connect("localhost","******","*******") or die ("Couldn't make connection.");
$db = mysql_select_db("registration", $connection) or die ("Couldn't select database.");
$sql = "SELECT seat, alias FROM attendees";
$sql_result = mysql_query($sql,$connection) or die("Couldn't execute query.");
$row = mysql_fetch_array($sql_result); $alias = $row['alias']; ?>
<center> <table class="seattable" width="650">
<?php for($i=0; $i<$totalSeats; $i++) { $val = $i + 1; if($i % $rowCount) { echo "<td align=\"center\" valign=\"middle\" "; }
else { echo "<tr>"; echo "<td align=\"center\" valign=\"middle\" class=\"rowheader\">"; echo $alphabet[($i / $rowCount)]; echo "</td>"; echo "<td "; }
if(in_array($val, $row))
{
echo " class=\"closed\"><a class=\"sold\" title=\"SOLD TO $alias\" onMouseOver=\"self.status='SOLD TO ".$alias."'; return true;\" onMouseOut=\"self.status=' '; return true;\">";
echo "{$alias}";
}
else
{
echo " class=\"open\">";
echo "<input type=\"radio\" name=\"seat\" value=\"{$val}\"><font class=\"avail\">{$val}</font>";
}
if($i % $rowCount + 1) { echo "</td>"; }
else { echo "</td></tr>"; } } ?> </table> </center>
here is what I am wanting to add - I tried placing this in several places in this code so far (top, middle & bottom) but whenever i add it, the output gets totally fudged....
<tr> <td class="rowspace"> </TD> <td class="space" colspan="15"> </td> </tr>
but I also need it to display ALL of the seats that are in the db as being sold and not just the first row...
TIA
================================================ 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
================================================