Hi all,

Having recently bought 'Build Your Own Database Driven Web Site Using PHP & MySQL'. I went through the installation process and everything was absolutely fine. Unfortunately I had to do a restore and went through the installation again. I am having hair pulling out inducing problems now.

I have a simple count example that utilises an include, so there is a folder with index.php in it which has an include statement that displays the output in a count.html.php php file. This works fine.

I then have this example which is constantly producing the following:

Server error
The website encountered an error while retrieving http://localhost/output/. It may be down for maintenance or configured incorrectly.
Here are some suggestions:
Reload this webpage later.
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfill the request.

The codes is as follows and password is replaced with my root password:


PHP Code:
if (!
$output 'Unable to connect to the database server.';

HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<?php echo $output; ?>
Hopefully someone can help me out, it would be greatly appreciated.