Hi there,

I am working through the Build Database Driven Website with PHP and Mysql by Kevin Yank edition 4.

I am having a problem connecting to my ijdb database when I use: include $_SERVER['DOCUMENT_ROOT'] . '/includes/db.inc.php'; I am able to connect to the database when I don't use the include but have the connection code in my controller file. So the issue is with the $_SERVER['DOCUMENT_ROOT'] which doesn't seem to work?

In the actual db.inc.php, I have ensured the connection details are correct: $link = mysqli_connect('', '*****', '*******');

So is there any reasons why include $_SERVER['DOCUMENT_ROOT'] won't work? Do I need to specify something in a php config file or something?