Location: PHPKode > projects > Gsys > admin/pledge_del.php
<?
//Filename : pledge_del.php
//Description : Interface to request deletion of pledge
//Author :  darc
//Last modified :  2006.12.20


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

//Select all pledges to display in table
    $sql ="SELECT * FROM $table_name WHERE status = \"pledge\" ORDER BY l_name;";
    $result = mysql_query($sql,$connection) or die(mysql_error());

//Initialize counter to number rows
    $counter = 0;
?>

<html>
<head><title>Delete Pledge from Database</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 DELETE 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>DELETE!</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 display 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=del"><input type="hidden" name="username" value="<?php echo $username; ?>"> <center><input type="submit" name="submit" value="DELETE!"></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