ninedoors Posted May 21, 2008 Share Posted May 21, 2008 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 More sharing options...
soycharliente Posted May 21, 2008 Share Posted May 21, 2008 My guess is that it's a syntax error farther up and it just realized it right there. Maybe show more code? Link to comment https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/#findComment-546577 Share on other sites More sharing options...
soycharliente Posted May 21, 2008 Share Posted May 21, 2008 Actually, do you need a ; after the include? Link to comment https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/#findComment-546580 Share on other sites More sharing options...
ninedoors Posted May 21, 2008 Author Share Posted May 21, 2008 There is no php code above that, just html. Nick Link to comment https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/#findComment-546582 Share on other sites More sharing options...
revraz Posted May 21, 2008 Share Posted May 21, 2008 Yes Actually, do you need a ; after the include? Link to comment https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/#findComment-546583 Share on other sites More sharing options...
ninedoors Posted May 21, 2008 Author Share Posted May 21, 2008 Wow woops. Was the ; after the include. Thanks, stupid me. Nick Link to comment https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/#findComment-546587 Share on other sites More sharing options...
soycharliente Posted May 21, 2008 Share Posted May 21, 2008 Yes Actually, do you need a ; after the include? I wasn't really asking, just trying to make him think Link to comment https://forums.phpfreaks.com/topic/106638-solved-help-with-simple-parse-error/#findComment-546592 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.