Location: PHPKode > projects > Gsys > admin/pledge_initiate.php
<?PHP
//Filename : pledge_initiate.php
//Description : Select pledges to initiate - therefore giving them "brother" status.
//Author :  darc
//Last modified :  2006.12.20

    include '../includes/auth_pledge_ed.php';  //Check for authentication
    include '../includes/db.php'; //setup database connection

//Find all the pledges
    $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>Initiate Pledge to Brother Status</title></head>
<body>


<center><h2>Current Pledge Roster  ||  Generated <?php echo date("F j, Y, g:i a"); ?></h2></center>
<br><br>
<CENTER>
<strong>THIS FORM DOES NOT ASK FOR CONFIRMATION - ONLY CLICK "INITIATE" IF YOU **REALLY** MEAN IT!!!</STRONG>
</CENTER>
<br><br>
<p><a href="pledge_man.php">Return Pledge Administration</a></p>

<!-- Setup table to display results -->
<table width="100%" border="1" cellpadding="0" bordercolor="#CCCCCC" bgcolor="#FFFFFF">
<tr>
<td><strong>INITIATE!</strong></td>
<td><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 results.
    while ($row =mysql_fetch_array($result))
    {
		$l_name = $row['l_name'];
		$f_name = $row['f_name'];
        $id = $row['stu_num'];
        $username = $row['username'];
?>

<tr>
<td>
<form method="POST" action="pledge_functions.php?cat=initiate"><input type="hidden" name="username" value="<?php echo $username; ?>"> <center><input type="submit" name="submit" value="INITIATE!"></form></center>
</td>
<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 Pledge Administration</a></p>
</body>
</html>

Return current item: Gsys