well...i thought it was working.... maybe i asked the wrong question to begin with
here is my code:
<?php
$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><tr>\n";
echo "<td align=\"center\" valign=\"middle\" class=\"rowheader\">";
echo $alphabet[($i / $rowCount)];
echo "</td>\n";
echo "<td align=\"center\" valign=\"middle\" ";
}
if(in_array($val, $row))
{
echo "class=\"closed\"><a class=\"sold\" 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>\n";
}
else
{
echo "</td></tr>\n\n";
}
}
?>
</table>
</center>
here is the output results:
http://www.lamerc.com/jay2/test2.php
and there are 2 things here:
1) I want to make th above look like this:
http://www.lanhorizon.com/step17.php
2) when pulling the seat from the db, it is only recognizing the first entry and not each one that has a seat value....