Page 1 of 1

Syntax Error

Posted: Sun Jul 10, 2011 11:49 pm
by KyleVan
I am working on a small controller file. I am pretty new to php and I know the code is basic and pretty simple for a php controller file.
I am getting a syntax error and I cant figure out why.. here is the code.

Code: Select all

<?php
//check for cookies and open session
include ('affilliate.inc.php');
//controller info
if(isset($_GET['goto'])
{
    $goto=$_GET['goto'];
    switch($goto)
    {
    case ('howworks'):
        include('pages/howworks.html.php');
        break;
    case ('offers'):
        include('pages/offers.html.php');
        break;
    case ('contact'):
        include('pages/contact.html.php');
        break;
    default:
        include('pages/error.html.php');
    }
//SYNTAX ERROR HERE
}
?>

Re: Syntax Error

Posted: Mon Jul 11, 2011 4:39 am
by Weirdan
You missed closing bracket for the if condition.