Ask a Question related to PHP Development, Design and Development.
-
Jay Fitzgerald #1
need help - past deadline
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/>[url]http://www.bayou.com[/url]
Toll Free: 888.30.BAYOU (22968)
Vox: 318.338.2034 / Fax: 318.338.2506
E-Mail: <mailto:jayfitz@bayou.com>jayfitz@bayou.com
ICQ: 38823829 / AIM: bayoujf / MSN: bayoujf / Yahoo: bayoujf
================================================
Jay Fitzgerald Guest
-
CFP: LL3; Submission deadline Oct. 17
Call for Presentations Lightweight Languages Workshop (LL3) http://ll3.ai.mit.edu/ November 8, 2003 Cambridge, Ma., USA The Lightweight... -
[PHP] Need help - past deadline
Jay Fitzgerald <mailto:jayfitz@bayou.com> on Tuesday, August 26, 2003 10:40 AM said: ... -
please help past deadline
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,... -
[PHP-DEV] karma deadline
"Greg Beaver" <greg@chiaraquartet.net> a écrit dans le message de news:3F3A8BAA.3010309@chiaraquartet.net... You're better to ask at... -
[PHP-DEV] karma deadline
Hi, I've done extensive work on fixing some bugs in PEAR, and have received permission from the core PEAR developers to commit them myself. ...



Reply With Quote

