Code Syntax Error for Init

I am trying to create a database log in, and am getting a a syntax error on my init page.

It is described as: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ‘)’ in /home/students/phannum/public_html/n413/ooplr/core/init.php on line 17.

I have the code listed below and highlighted the error line. Help?!

<?php session_start(); $GLOBALS['config'] = array( 'mysql' => array( 'host' => '127.0.0.1', 'username' => 'root', 'password' => '', 'db' => 'lr' ), 'remember' => array( 'cookie_name' => 'hash', 'cookie_expiry' => 604800 ), 'session' => array( 'session_name' => 'user' [size=18pt][b] 'token_name' => 'token'[/b][/size] ), ); spl_autoload_register(function($class){ require_once 'classes/' .$class . '.php'; }); require_once 'functions/sanitize.php';

line 17 isn’t the problem, its with }); in the bottom function.

spl_autoload_register(function($class){
require_once ‘classes/’ .$class . ‘.php’;
});

that’s the issue. You need a comma after ‘user’ in the array and no comma after the last array.

Sponsor our Newsletter | Privacy Policy | Terms of Service