Jump to content

a09hopper

New Members
  • Posts

    1
  • Joined

  • Last visited

a09hopper's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. <?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.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.