prepare($SQL);
$search->execute();
if($search){
$results = $search->fetchall(PDO::FETCH_OBJ);
if(!empty($results)){
$count = count($results);
foreach($results as $r){
$id = $r->id;
$name_parts = array();
$last = htmlentities($r->last, ENT_COMPAT, 'UTF-8');
if($last){ $name_parts[] = $last; }
$first = htmlentities($r->first, ENT_COMPAT, 'UTF-8');
if($first){ $name_parts[] = $first; }
$name = implode(', ', $name_parts);
$type = client_type($r->type);
$loans = '';
$content .= <<
There are $count clients on record.$name
$type
EOT;
}
$results = true;
} else { $results = false; }
}
$page = <<
$content
Client
Client Type