[Solved] PHP error: “syntax error, unexpected T_STRING, expecting ‘)’ [closed]


You have issued an if statement. So Naturally, PHP looks to complete the statement. Hence why your getting the error stating an expected closing bracket.

Remove your if statement and your code should look like this:

if(OS == "XP"){
    header('Location: XP.html');
exit();
}

PHP error reporting isn’t the best tool in the world. It alerts you to the rough place, but it’s up to you to look for what should and shouldn’t be near/on that line.

solved PHP error: “syntax error, unexpected T_STRING, expecting ‘)’ [closed]