I can't figure out this error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\Program Files\Abyss Web Server\htdocs\forum\login\validate.php on line 12 This is my code: <?php //get input data $user=$_POST["username"]; $pass=$_POST["password"]; //encrypt username and pass $cuser=md5($user); $cpass=md5($pass); //include login file include($user".php"); //make sure info matches and changes user's logged in file to 1 if ($cuser==$realuser && $cpass==$realpass) { $File = $user"ok.txt"; $Handle = fopen($File, 'w'); $Data = "0"; fwrite($Handle, $Data); fclose($Handle); //redirect to main.php header( 'Location: main.php' ); ?> Thanks for any help
Try changing this line include($user".php"); to this: include $user . ".php"; Then the $File = line will have to be changed too. $File = $user . "ok.txt";