mirror of
https://gitlab.com/harald.mueller/aktuelle.kurse.git
synced 2024-11-30 13:41:58 +01:00
24 lines
411 B
PHP
24 lines
411 B
PHP
|
<?
|
|||
|
#<23>ffnet die db und gibt db-handle zur<75>ck
|
|||
|
function open_db()
|
|||
|
{
|
|||
|
$mysqlhost = "localhost";
|
|||
|
$mysqluser = "pearson";
|
|||
|
$mysqlpwd = "geheim";
|
|||
|
$mysqldb = "test";
|
|||
|
|
|||
|
$conn = @mysql_connect($mysqlhost,$mysqluser,$mysqlpwd);
|
|||
|
if ($conn) {
|
|||
|
mysql_select_db($mysqldb);
|
|||
|
|
|||
|
return $conn;
|
|||
|
}
|
|||
|
else {
|
|||
|
echo "Datenbankverbindung konnte nicht hergestellt werden. Bitte versuchen Sie es erneut. Danke!";
|
|||
|
|
|||
|
}
|
|||
|
}
|
|||
|
?>
|
|||
|
|
|||
|
|