// create connection
$conn = new mysqli($server, $username, $password, $db);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$conn->close();
I am trying to connect my php file with a cleardb database using the heroku platform. My connection details and config are correct when I test using the sqlworkbench, but how do I know if my php is connected?
I've tried echo "Connected successfully"
, but it doesn't appear.
And where is the composer.json file?