Location: PHPKode > projects > Gsys > admin/pledge_roster.php
<?PHP
//Filename : pledge_roster.php
//Description : Roster of all pledges
//Author :  darc
//Last modified :  2006.12.20

    include '../includes/auth_pledge_ed.php';
    include '../includes/db.php';

//Select all the pledges from the database (where brothers.status == "pledge")
	$sql ="SELECT * FROM $table_name WHERE status = \"pledge\" ORDER BY l_name;";
	$result = mysql_query($sql,$connection) or die(mysql_error());

    $counter = 0;

?>

<html>
<head><title>Current Pledge Roster</title></head>
<body>

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

<!-- Setup table to display results -->
<table width="100%" border="1" cellpadding="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td width="6%"><strong>Index</strong></td>
<td><strong>Last Name</strong></td>
<td><strong>First Name</strong></td>
<td><strong>ID#</strong></td>
</tr>

<?php
//Loop to print out all 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="pledge_man.php">Return to Pledge Administration</a></p>

</body>
</html>

Return current item: Gsys