<?php
require("../common/database.php");
if ( ! $link ) {
die( "Couldn't connect to MySQL: ".mysql_error() );
}
if (isset($_GET['client']) && $_GET['client'] != '') {
//Add slashes to any quotes to avoid SQL problems.
$client = addslashes($_GET['client']);
//Get every page title for the site.
$result = mysql_query("SELECT * FROM client_key_person WHERE Client_Name='".$client."'");
echo "<option value=''>-select kp-</option";
while($ckp = mysql_fetch_array($result)) {
//Return each page title seperated by a newline.
echo "<option value='".$ckp['Id']."'>".$ckp['Name']."\n";
}
}
?>