This commit is contained in:
2025-04-15 20:29:16 +02:00
commit 7cd04e2a52
13 changed files with 443 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
$databaseFile = 'rippchen.db'; // Path to your SQLite database file
try {
$db = new PDO("sqlite:" . $databaseFile);
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die("Database connection failed: " . $e->getMessage());
}
// Function to sanitize user input (remains the same)
function sanitize_input($data) {
$data = trim($data);
$data = stripslashes($data);
return htmlspecialchars($data);
}