I am developing a membership system and I have hit a stopper, normally I would only post questions on here but i have a error I can not work out and have been on this error for over a hour.
the error I am getting is:
*Parse error: syntax error, unexpected ',' in /home/ob219/public_html/membership/core/init.php on line 10*
I just cant see the bug in the code, would appriciate a second pair of eyes to look over the code.
Code
<?php
session_start();
$GLOBALS['config'] = array(
'mysql' => array(),
'host' => '#####',
'username' => '###',
'password' => 's####',
'db' => '####'
),
'remeber' => array(
'cookie_name' => 'hash',
'cookie_expiry' => 604800
),
'session' => array(
'session_name' => 'user'
)
);
spl_autoload_register(function($class) {
require_once 'classes/' . $class . 'php';
});
require_once 'functions/sanitize.php';
'mysql' => array(),
should be 'mysql' => array(
$GLOBALS['config'] = array(
'mysql' => array(
'host' => '#####',
'username' => '###',
'password' => 's####',
'db' => '####'
),
'remeber' => array(
'cookie_name' => 'hash',
'cookie_expiry' => 604800
),
'session' => array(
'session_name' => 'user'
)
);
$GLOBALS['config'] = array(
'mysql' => array(), <===== syntax error here. you don't want the close) and comma