I'm trying to workout a login script which has a login form and a set of required files, among them db_connection.php (below)
<?php
define("DB_SERVER", "localhost");
define("DB_USER", "LoginSystem");
define("DB_PASS", "secret");
define("DB_NAME", "login2015");
$connection = mysqli_connect(DB_SERVER, DB_USER, DB_PASS, DB_NAME);
if(mysqli_connect_errno()) {
die("Database connection failed: " .
mysqli_connect_error() .
" (" . mysqli_connect_errno() . ")"
);
}
?>
when trying to run index.php I get the following error
Parse error: syntax error, unexpected '"login2015"' (T_CONSTANT_ENCAPSED_STRING) in C:\xampp\htdocs\login\includes\db_connection.php on line 5
changing the name of the DB_NAME constant or replacing double quotes by single quotes does nothing. What's more. Even changing the DB_NAME constant to something entirely different yields the exact same error, including "'login2015'" as part of the error message even though the constant is no longer defined as that.
Might it have something to do with php.ini configuration cache or something of the sort? Thanks for the help!