Location: PHPKode > projects > Gsys > php/brother_roster.php
<?PHP
//Filename : brother_roster.php
//Description :  Displays all active brothers
//Author :  darc, Marty
//Last modified :  2006.12.20

    include '../includes/auth.php';
    include '../includes/db.php';
	include '../includes/vars.php';

	$sql ="SELECT l_name, f_name, stu_num FROM $table_name WHERE status = \"active\" && l_name != \"\" ORDER BY l_name;";
	$result = mysql_query($sql,$connection) or die(mysql_error());

    $counter = 1; //setup row counter
?>

<html>
<head><title><?php echo "".$chapter. " :: Current Brother Roster :: " .$school.""; ?> </title>
<link href="../includes/index.css" rel="stylesheet" type="text/css">
</head>

<body class="body">
<center><h2>Current Brother Roster  ||  Generated <?php echo date("F j, Y, g:i a"); ?></h2></center>
<br><br>
<p><a class="body" href="/php/brother_home.php">Return to Brother Home</a></p>
<br><br>

<!-- Setup table to display data -->
<table width="100%" border="0" cellpadding="0">
<tr>
<td width="3%"></td>
<td><strong>Last Name</strong></td>
<td><strong>First Name</strong></td>
<td><strong>ID#</strong></td>
</tr>

<?php
//Loop through the results
    while ($row =mysql_fetch_array($result))
    {
        $l_name = $row['l_name'];
        $f_name = $row['f_name'];
        $id = $row['stu_num'];
?>

<tr>
<td><?php echo($counter); $counter++; ?></td>
<td><?php echo($l_name);?></td>
<td><?php echo($f_name);?></td>
<td><?php echo($id);?></td>
</tr>

<?php
    } //close loop
?>

</table>

<p><a href="/php/brother_home.php">Return to Brother Home</a></p>
</body>
</html>
Return current item: Gsys