0
// 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?

Website : https://best-app-ever-g52grp.herokuapp.com/

peak
  • 105,803
  • 17
  • 152
  • 177
Kesh
  • 75
  • 1
  • 1
  • 7

0 Answers0