change folder structure for KA's
This commit is contained in:
19
Zweites Jahr/Klassenarbeit/LBT3/KA2/db_connect.php
Normal file
19
Zweites Jahr/Klassenarbeit/LBT3/KA2/db_connect.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
// DANIEL CWIKLA
|
||||
function db_connect() {
|
||||
require_once "db_connection.php";
|
||||
|
||||
$db_server = "$db_engine:dbname=$db_name;host=$db_host";
|
||||
|
||||
try {
|
||||
$dbh = new PDO($db_server, $db_user, $db_password);
|
||||
echo "<p>DB Connected</p>";
|
||||
return $dbh;
|
||||
}
|
||||
catch(PDOException $e) {
|
||||
die("<p>Error</p>");
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user