I have an index.php with emitts the error:
Parse error: parse error, unexpected $ in /home/trecollc/public_html/scripts/phpmycal/index.php on line 117
as far as i can see...on line 117 there is no $, or infact anywhere else on the page (other than a var) What does this error mean excatly??
the index/php source is::
<HTML>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=700,left = 262,top = 34');");
}
</SCRIPT>
</HEAD>
<body>
<?php
include('../config.php');
include('../dbconnect.php');
$dbconn;
include('../db.php');
include('lang/eng.php');
include('lang/eng.set.php');
//START OF CODE - DO NOT EDIT BELOW THIS LINE
// Get values from query string
$day = $_GET["day"];
$month = $_GET["month"];
$year = $_GET["year"];
$sel = $_GET["sel"];
$what = $_GET["what"];
if($day == "")
$day = date("j");
if($month == "")
$month = date("m");
if($year == "")
$year = date("Y");
$currentTimeStamp = strtotime("$year-$month-$day");
$monthName = date("F", $currentTimeStamp);
$numDays = date("t", $currentTimeStamp);
$counter = 0;
$numEventsThisMonth = 0;
$hasEvent = false;
$todaysEvents = "";
echo "<table width='350' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td class='head' width='50'>S</td>
<td class='head' width='50'>M</td>
<td class='head' width='50'>T</td>
<td class='head' width='50'>W</td>
<td class='head' width='50'>T</td>
<td class='head' width='50'>F</td>
<td class='head' width='50'>S</td>
</tr> ";
//Num of days in current month
$numDays = date("t", $currentTimeStamp);
for($i = 1; $i < $numDays+1; $i++, $counter++)
{
$timeStamp = strtotime("$year-$month-$i");
if($i == 1)
{
// Workout when the first day of the month is
$firstDay = date("w", $timeStamp);
for($j = 0; $j < $firstDay; $j++, $counter++)
echo "<td> </td>";
}
if($counter % 7 == 0)
echo "</tr><tr>";
echo "<td width='50'><a href=\"javascript:popUp(\"event.php?d=$I&m=$month&y=$year\")\">$I</a></td>";
if(date("w", $timeStamp) == 0 || date("w", $timeStamp) == 6)
echo "class='weekend'";
else
if($i == date("d") && $month == date("m") && $year == date("Y"))
echo "class='today'";
else
echo "class='normal'";
?>
<tr>
<td width='50' colspan='1'>
<input type='button' value=' < ' onClick='goLastMonth(<?php echo $month . ", " . $year; ?>)'>
</td>
<td width='250' colspan='5'>
<span class='title'><?php echo $monthName . " " . $year; ?></span><br>
</td>
<td width='50' colspan='1' align='right'>
<input type='button' value=' > ' onClick='goNextMonth(<?php echo $month . ", " . $year; ?>)'>
</td>
</tr>
<script type="JavaScript">
function goLastMonth(month, year)
{
// If the month is January, decrement the year
if(month == 1)
{
--year;
month = 13;
}
document.location.href = 'index.php?month='+(month-1)+'&year='+year;
}
function goNextMonth(month, year)
{
// If the month is December, increment the year
if(month == 12)
{
++year;
month = 0;
}
document.location.href = 'index.php?month='+(month+1)+'&year='+year;
}
</script>
</body>
</HTML>
TIA RT