Here is the complete code for the test page. Only thing I changed was the mysql_connect information...
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<?php
// Make a MySQL Connection
mysql_connect("xxx.xxx.xxx.xx", "login", "password") or die(mysql_error());
mysql_select_db("nlchdb") or die(mysql_error());
// Retrieve all the data from the "webcalendar_events" table
$result = mysql_query("SELECT * FROM webcalendar_events WHERE dt >= now() AND color='ffff00' ORDER BY dt")
or die(mysql_error());
while($row = mysql_fetch_array($result, MYSQL_ASSOC))
{
$monthnames = array(
"01"=>"January",
"02"=>"February",
"03"=>"March",
"04"=>"April",
"05"=>"May",
"06"=>"June",
"07"=>"July",
"08"=>"August",
"09"=>"September",
"10"=>"October",
"11"=>"November",
"12"=>"December");
list($year, $month, $day) = split('[/.-]', $row['dt']);
$month = $monthnames[$month];
echo "<p><strong>{$month} {$day}, {$year}</strong><br />".
"Decription: {$row['description']}</p>";
}
$q = mysql_query("SELECT * FROM webcalendar_events WHERE dt >= now() AND color='ffff00' ORDER BY dt");
while($r = mysql_fetch_assoc($q)) {
print_r($r);
}
?>
</body>
</html>
Again the code does a good job with the exception of adding extra info to the link urls.
Bookmarks