dienstplancreator git · main
Dienstplan (roster) creator, PHP/JS web app
JavaScript 50% PHP 40.5% CSS 8.5%git clone https://git.christianimmanuel.de/web-tools/dienstplancreator.gitwget https://git.christianimmanuel.de/web-tools/dienstplancreator/archive/dienstplancreator.tar.gzapi/config/db_inc.php raw
<?php
/*
* This example script can be downloaded from Alex Web Develop "PHP Login and Authentication Tutorial":
*
* https://alexwebdevelop.com/user-authentication/
*
* You are free to use and share this script as you like.
* If you share it, please leave this disclaimer inside.
*
* Subscribe to my free newsletter and get my exclusive PHP tips and learning advice:
*
* https://alexwebdevelop.com/
*
*/
/* Host name of the MySQL server */
$host = 'localhost';
/* MySQL account username */
$user = '';
/* MySQL account password */
$passwd = '';
/* The schema you want to use */
$schema = 'datadienstplandb';
/* The PDO object */
$pdo = NULL;
/* Connection string, or "data source name" */
$dsn = 'mysql:host=' . $host . ';dbname=' . $schema;
/* Connection inside a try/catch block */
try
{
/* PDO object creation */
$pdo = new PDO($dsn, $user, $passwd);
/* Enable exceptions on errors */
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
}
catch (PDOException $e)
{
/* If there is an error an exception is thrown */
echo 'Database connection failed<br>';
print_r($e);
die();
}