0

Why am I getting this Syntax error on line 3 in config.php? syntax error, unexpected '$username' (T_VARIABLE) in This is my config.php file:

<?
$host='localhost'; 
$username="xxxxxxx"; 
$dbname="xxxxxxx"; 
$password="xxxxxxx";

$mysqli = new mysqli($host,$username,$password,$dbname);
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
?>
JavaJoker204
  • 83
  • 1
  • 9

1 Answers1

-1

This is due to php short opening tags are not enabled. You should either enable it or use full tags instead.

Use <?php instead of just <?

OR

Follow this thread to enable short tags.