Config file:
$db=array(
'host' => 'localhost',
'user' => 'root',
'pass' => 'secret',
'name' => 'jack',
);
Index file
$mysql = new mysqli($db['host'],$db['user'],$db['pass'],$db['name']);
$mysql->set_charset('utf8mb4');
if($mysql->connect_errno)
{
die('Database connection could not be established. Error number: '.$mysql->connect_errno);
}
I get:
Database connection could not be established. Error number: 1045
Please guys, tell me what to do and I will respond you with the answer in 30 seconds!
UPDATE:
Okay so if i make change line to
$mysql = new mysqli(localhost,root,secret,jack);
it works, but how do I get it work with the tags?