<th class="sorttable_nosort"></th> <th class="sorttable_nosort"></th> </tr> <? foreach($clubs as $club) { $club_id = $club[0]; $club_name = $club[1]; $deadline = clubdue($club_id); ?> <tr> <td><a href="#"><?php echo $club_name; ?> </a></td> <td><?php echo clubTimeString($deadline); ?> </td> <td> <form action="addClub.php?mode=subscribe" method="POST"> <button name="club" value="<?php echo $club_id; ?> " class="email_add">Subscribe</button> </form> </td> <td> <form action="addClub.php?mode=apply" method="POST"> <button name="club" value="<?php echo $club_id; ?>
function clubInfo($club_id) { $club_id = escape($club_id); $result = mysql_query("SELECT name, description, open_time, close_time, num_recommend, money FROM clubs WHERE id='{$club_id}'"); if ($row = mysql_fetch_array($result)) { return array($row[0], $row[1], clubTimeString($row[2]), clubTimeString($row[3]), $row[4], $row[5]); } else { return array("Unknown", "Club could not be found"); } }