0

I seem to have a problem which I can't seem to figure out. I've made a simple index.php where I include all my files on conditions.

But I get an 500 error: PHP Parse error: syntax error, unexpected '{' in index.php on line 6

My code looks like this:

<?php
session_start();
$level = $_SESSION['Code'];
$functie = $_SESSION['cia'];

if (ISSET($_POST['projectmaken']) || ISSET($_POST['verstuurf']) {
    include 'NieuwProject.php';
}
else {
if ($level == 3 || $level == 4 || $functie == "supervisor") {
    include 'deadlineproject.php';
    }
else {
    include '/';
    }
}
?>

Does anyone know the problem here?

Thanks in advance!

MrPerry
  • 1
  • 1
  • There is a missing `)` in the line `if (ISSET($_POST['projectmaken']) || ISSET($_POST['verstuurf']) {` – axiac Jun 08 '17 at 10:06
  • Possible duplicate of [PHP Parse/Syntax Errors; and How to solve them?](https://stackoverflow.com/questions/18050071/php-parse-syntax-errors-and-how-to-solve-them) – axiac Jun 08 '17 at 10:07
  • Also, the line `include '/';` will give you headache. `'/'` is a directory, [`include`](http://php.net/manual/en/function.include.php) expects a file. – axiac Jun 08 '17 at 10:08

0 Answers0