15 lines
407 B
PHP
15 lines
407 B
PHP
|
<?php
|
||
|
$db_link = mysqli_connect('localhost', 'root', '', 'bibliothek');
|
||
|
|
||
|
if(!$db_link){
|
||
|
die("<p>Verbindung nicht hergestellt</p>");
|
||
|
}else{
|
||
|
echo "Verbindung hergestellt!";
|
||
|
}
|
||
|
|
||
|
function runSQL($sql){
|
||
|
global $db_link;
|
||
|
$db_res = mysqli_query($db_link, $sql) or die("SQL_Abfrage: " . $sql . "Fehler: " . mysqli_error($db_link));
|
||
|
return $db_res;
|
||
|
}
|
||
|
?>
|