I ran the script on my local server and got
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in C:\xampp\htdocs\code.php on line 62
Apparently this line:
echo " <a href="loggedin/index.php" class="noeffect">Klik hier om verder te gaan</a>";
has an error because you did not escape the double quotes. You should use this instead:
echo ' <a href="loggedin/index.php" class="noeffect">Klik hier om verder te gaan</a>';
OR (not recommended):
echo " <a href=\"loggedin/index.php\" class=\"noeffect\">Klik hier om verder te gaan</a>";
It may be the way that your server is configured to output HTTP 500 error instead of showing the PHP error when an error occurs.