Location: PHPKode > projects > Gsys > php/phone_list_actives.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

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

<body class="body">
<center><h2>Current Phone List  ||  Generated <?php echo date("F j, Y, g:i a"); ?></h2></center>
<p><a class="body" href="/php/brother_home.php">Return to Brother Home</a></p>

<!-- Setup table to display data -->
<table width="100%" border="0" cellpadding="0">
<td width="3%"></td>
<td><strong>Last Name</strong></td>
<td><strong>First Name</strong></td>
<td><strong>Phone #</strong></td>

//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'];

<td><?php echo($l_name);?></td>
<td><?php echo($f_name);?></td>
<td><?php echo($phone);?></td>

    } //close loop


<p><a href="/php/brother_home.php">Return to Brother Home</a></p>
Return current item: Gsys