\n";
// connect to mysql
$link = mysql_connect($mysqlServAddr, $mysqlUser, $mysqlPass) or die("Could not connect to server. MYSQL Error: " . mysql_error());
$db = mysql_select_db($mysqlDB, $link) or die("Could not connect to database. MYSQL Error: " . mysql_error());
$sql = "SELECT $listAwards FROM $mysqlTable WHERE year = '$year' ORDER BY recipient";
// get result and close mysql connection
$result = mysql_query($sql);
if (!$result)
$phpErr = "Problem with query MYSQL Error: " . mysql_error();
mysql_close($link);
// handle output from query and build html response
while ($item = mysql_fetch_row($result)) {
$reportList .= "
$item[0], ";
for ($i = 1; $i<$linked; $i++) {
$reportList .= "$item[$i] ";
}
if (!empty($item[$linked])) {
$reportList .= "Read More ";
}
$reportList .= "