[insert_php]

require ‘dbconfig.php’;

$con = mysqli_connect($db_host, $db_user, $db_password, ‘staff’) or die (mysql_error());

echo ‘

‘;
echo ‘Search For:

‘;
//echo ‘Sort By: ‘;

echo ‘‘;
echo ‘

‘;

$sql = “SELECT * FROM staffdata ORDER BY LName ASC”;

$mydata = mysqli_query($con,$sql);

echo ‘

‘;

while ($record = mysqli_fetch_array($mydata)) {

$count++;
if( $count % 2 == 0 ) {
$class = ” class=’odd'”;
} else {
$class = “class=’even'”;
}

echo ‘

‘;
}

echo ‘

First Name Last Name Position Location Phone Ext. Email
‘;
echo $record[‘FName’];
echo ‘
‘;
echo $record[‘LName’];
echo ‘
‘;
echo $record[‘Position’];
echo ‘
‘;
echo $record[‘Location’];
echo ‘
‘;
echo $record[‘Phone’];
echo ‘
‘;
echo $record[‘Ext’];
echo ‘
‘;
echo $record[‘Email’];
echo ‘

‘;

mysqli_close($con);

[/insert_php]