Yeah, at first, I didn't think the other code mattered, but it obviously does. Here's the entire script that outputs data for input into a flash file:
<?php
include("itn.globals.php");
include("itn.opendb.php");
$currentDate=date("Y-m-d");
echo ("itncontent=");
$query="SELECT distinct(DATE_FORMAT( `details_date` , '%Y' )) AS
years from itn_details group by details_date" ;
$Res=mysql_query($query, $connection);
while($row=mysql_fetch_assoc($Res))
{
echo ("<br><br><font size='20' color='#F9D9A3'> " . $row['years'] . " Itinerary</font>");
echo ("<br>\n");
$sql1="SELECT Distinct(DATE_FORMAT( `details_date` , '%M' )) AS
Month from itn_details WHERE details_date >='$currentDate'
and DATE_FORMAT( `details_date` , '%Y' )='".$row['years']."'
group by Month order by details_date";
$Res1=mysql_query($sql1, $connection);
while($row1=mysql_fetch_assoc($Res1))
{
echo ("<img src='images/hr.png' height='2' width='400' align='left'><br>\n");
echo ("<font size='16' color='#F9D9A3'> " . $row1['Month'] . "</font>");
echo ("<br>\n");
$sql2="SELECT *,
DATE_FORMAT(`details_date`, '%M %d') AS start_date,
DATE_FORMAT(`details_end_date`, '%d') AS end_date,
DATE_FORMAT(`details_date`, '%Y') AS start_year
FROM itn_details
WHERE (details_end_date IS NULL AND details_date >='$currentDate') OR (details_end_date >= '$currentDate')
and DATE_FORMAT( `details_date` , '%Y' )='".$row['years']."'
and DATE_FORMAT( `details_date` , '%M' )='".$row1['Month']."'";
$Res2=mysql_query($sql2, $connection);
while($getRecord=mysql_fetch_assoc($Res2))
{
$getRecord['details_date'];
$breakDate=explode("-", $getRecord['details_date']);
echo ("<br><font size='11'><font color='#F9D9A3'> " . $getRecord['start_date']);
if($getRecord['end_date'] > "00") {
echo (" - " . $getRecord['end_date']);};
echo (", " . $getRecord['start_year'] . "</font><br>");
echo (" " . $getRecord['details_church']); echo "<br>";
echo (" " . $getRecord['details_city_state']); echo "<br>";
if($getRecord['details_pastor'] > " ") {
echo (" " . $getRecord['details_pastor']); echo "<br>";};
if($getRecord['details_phone'] > " ") {
echo (" " . $getRecord['details_phone']); echo "<br>";};
if($getRecord['details_link'] > " ") {
echo (" <a href='".$getRecord['details_link']."' target='_blank'><u><font color='#378ABC'>" . $getRecord['details_link']); echo "</font></u></a><br>";};
echo ("</font><br>");
}
}
}
include("itn.closedb.php");
?>
Something in there is causing the problem.