Candle/connect_db.php

17 lines
440 B
PHP
Raw Normal View History

2023-05-26 16:39:10 +02:00
<?php
2023-05-28 13:37:02 +02:00
$servername = "141.19.142.11";
$username = "web_b-3";
$password = "een7Ao6s";
$database = "bibliothek_candle";
try {
$conn = new PDO("mysql:host=$servername;dbname=$database", $username, $password);
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
echo "Connected successfully";
} catch(PDOException $e) {
echo "Connection failed: " . $e->getMessage();
}
2023-05-26 16:39:10 +02:00
?>