Location: PHPKode > projects > Gsys > php/phone_list_actives.php
<?PHP
//Filename : phone_list_actives.php
//Description : Show ACTIVE members phone numbers
//Author :  darc
//Last modified :  2006.12.20

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

	$sql ="SELECT l_name, f_name, phone, status FROM $table_name 
WHERE l_name != \"\" && phone != \"none\" && status = \"active\" 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></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></td>
<td><?php echo($l_name);?></td>
<td><?php echo($f_name);?></td>
<td><?php echo($phone);?></td>
<td></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