Ah ah, good. 
So, next step then.
Place the following in the script, edit the $database settings (hostname, username, password, schema) at the top accordingly and upload.
PHP Code:
<?php
error_reporting(-1);
ini_set('display_errors', true);
/*
Edit these
*/
$database = array(
'hostname' => 'localhost',
'username' => 'anthony',
'password' => 'super-secret',
'schema' => 'my_cms'
);
$conn = mysql_connect(
$database['hostname'],
$database['username'],
$database['password']
);
if(false === is_resource($conn)){
echo 'Cannot connect to database: ' . mysql_error() ;
exit;
}
if(false === mysql_select_db($database['schema'], $conn)){
echo 'Cannot select schema: ' . mysql_error() ;
exit;
}
?>
<html>
<head>
<title>Test</title>
</head>
<body>
<h1>
Connected successfully!
</h1>
<p>
<?php printf("MySQL server version: %s", mysql_get_server_info($conn)); ?>
</p>
</body>
</html>
What do we get now?
Bookmarks