mirror of
https://github.com/FlyInTheBox/31TSAI.git
synced 2024-11-09 20:44:11 +01:00
29 lines
No EOL
948 B
PHP
29 lines
No EOL
948 B
PHP
<!doctype html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport"
|
|
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
|
<meta http-equiv="X-UA-Compatible" content="ie=edge">
|
|
<title>Połączenie z bazą</title>
|
|
</head>
|
|
<body>
|
|
<?php
|
|
$database = 'wylazowski';
|
|
$servername = 'localhost';
|
|
$mysqliProceduralConection = mysqli_connect($servername, 'Wylazowski', 'tajnehaslo', $database);
|
|
|
|
if (!$mysqliProceduralConection)
|
|
{
|
|
die("Próba połączenia z bazą danych zakończyła się niepowodzeniem. Błąd: "
|
|
. mysqli_connect_error());
|
|
}
|
|
echo '<p>Połączono z bazą danych <b>' . $database . '</b> na serwerze <b>' . $servername . '</b><br>';
|
|
echo 'Host info: ' . $mysqliProceduralConection->host_info . '<br>';
|
|
echo 'MySQLi stat: ' . mysqli_stat($mysqliProceduralConection) . '</p>';
|
|
|
|
|
|
mysqli_close($mysqliProceduralConection);
|
|
?>
|
|
</body>
|
|
</html>
|