Jump to content

[SOLVED] Help with simple parse error


ninedoors

Recommended Posts

Here is the error I am getting:

 

Parse error: syntax error, unexpected T_VARIABLE in C:\xampp\htdocs\BigC\content\events.php on line 284

 

I can't for the life of me see where the error is.  I am using the $_GET method from this url:

 

http://127.0.0.1/BigC/content/events.php?day=10&month=05&year=2008

 

So it looks like the data is being passed right.  Here is the code I am using:

 

<?php
include ('config.php')

				$day = $_GET['day'];
				$month = $_GET['month'];
				$year = $_GET['year'];//line 284

				//if a specific day is clicked
				if (isset($day))	
				{
				$result = "SELECT date, events, numhole, starttime, format FROM events WHERE (DAYOFMONTH(date)='$day' AND MONTH(date)='$month' AND YEAR(date)='$year') ORDER BY date";
				while($row = mysql_fetch_assoc($result))
				{
				$date = $row['date'];
				$event = $row['event'];
				$holes = $row['numhole'];
				$time = $row['starttime'];
				$format = $row['format'];

				$link = "<a href='events.php?month=".$month."&year=".$year."' class='geor12'>Current Month Events</a></td>".
						"<td><a href='events.php?year=".$year." class='geor12'>Current Year Events</a>";
				$case = 12;

				$useddate = $year.'-'.$month.'-'.$day;
				$newformat = date('l, F jS, Y', $useddate);
				echo "These are the events that are scheduled for " . $newformat . ".  Please note:  We will do our best to update any changes but this schedule is subject to change without notice.";
				}
				}
?>

 

That is basically the relevant code.  The error is telling me it is this line: $year = $_GET['year'];

 

Thanks for any help you can offer.

 

Nick

Link to comment
https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.