<?php
$database = array();
$database['host'] = "localhost";
$database['port'] = '3306';
$database['name'] = "forumtest";
$database['username'] = "root";
$database['password' = "Password";
$link = mysql_connect($database['host], $database['username'], $database['password']);
if ($link) {
echo "Connected to a database".$database['name'];
}else{
echo connect to a database"$database['name'] . "failed<br/>";
echo "Error: ".mysql_error();
}
?>
This is my code for a test to connect to a database however, there seems to be a problem with the code as when I try to connect it just gives me a error 500. I would appreciate any help.