finger / db_connect.php
multibiz's picture
no fingerprint image is displayed in the section
4e26128 verified
Raw History Blame Contribute Delete
398 Bytes
```php
<?php
$host = 'localhost';
$dbname = 'biometric_db';
$username = 'root';
$password = '';
try {
$pdo = new PDO("mysql:host=$host;dbname=$dbname;charset=utf8", $username, $password);
$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch (PDOException $e) {
die("Database connection failed: " . $e->getMessage());
}
?>
```
3. Here's the fingerprint saving script: