Parse error: syntax error, unexpected T_STRING in /www/vndv.com/c/r/a/craftystrats/htdocs/index/login3.php on line 4
<?php session_start(); if(!isset($_SESSION["username"]) header('Location: login.php'); exit; } ?>
im confused. it looks flawless.
Missing a closing ')' for the if() statement there.
try
<?php session_start(); if(!isset($_SESSION["username"])) { header('Location: login.php'); exit; } ?>
Examine the "if" line to see what was wrong.
sorry, i accidentally posted an old error that i had. i updated my post. now THATS confusing.
Well, assuming you fix the error we've pointed out, then there are no parse errors in the code you provided, so double check that you're posting the correct snippet.
Funny; the code that's there right now has two parse errors in it.
The code I posted executes just fine.
Oops, you're right Weedpacket - didn't notice the missing '{' as well. :o