Location: PHPKode > projects > Gsys > php/phone_list.php
<?PHP
//Filename : phone_list.php
//Description :  Show all active users/pledges phone numbers
//Author :  Marty
//Last modified :  2006.01.12


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

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

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

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

<body class="body">
<center><h2>Current Phone List  ||  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>Phone #</strong></td>
<td><strong>Status</strong></td>
</tr>

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

<tr>
<td><?php echo($counter); $counter++; ?></td>
<td><?php echo($l_name);?></td>
<td><?php echo($f_name);?></td>
<td><?php echo($phone);?></td>
<td><?php echo($status);?></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