<?php
session_start();
$host = 'localhost';
$db   = 'deltaweb_demostock';
$user = 'deltaweb_demostock';
$pass = 'deltaweb_demostock';

$dsn = "mysql:host=$host;dbname=$db;charset=utf8";
$pdo = new PDO($dsn, $user, $pass, [PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION]);

function e($str){ return htmlspecialchars($str, ENT_QUOTES, 'UTF-8'); }

define('UPLOAD_DIR', __DIR__ . '/uploads/');
if (!is_dir(UPLOAD_DIR)) mkdir(UPLOAD_DIR, 0777, true);
?>
