Location: PHPKode > projects > Gsys > php/brother_roster.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

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

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

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

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

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

    } //close loop


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