document.write("
<?php
$host = "localhost";
$databaseName = "myDatabaseName";
$username = "myUsername";
$password = "myPassword";
$dsn = "mysql:host=$host;dbname=$databaseName";
try {
$databaseConnection = new PDO($dsn, $username, $password);
echo "Connection successful.";
} catch (PDOException $error) {
echo "Connection failed: " . $error->getMessage();
}
pdo5 - Snippet hosted by \"Cacher\"
");