20 lines
539 B
PHP
20 lines
539 B
PHP
|
<?php
|
||
|
session_start();
|
||
|
|
||
|
error_reporting(E_ALL);
|
||
|
ini_set('display_errors', 0); // Set to 1 for debugging purposes
|
||
|
$servername = "localhost";
|
||
|
$username = "username";
|
||
|
$password = "definetelysecurepwd123";
|
||
|
$dbname = "plan_to_watch";
|
||
|
|
||
|
try {
|
||
|
$conn = new PDO("mysql:host=$servername;dbname=$dbname;charset=utf8mb4", $username, $password);
|
||
|
// Set PDO error mode to exception
|
||
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
|
||
|
} catch(PDOException $e) {
|
||
|
echo "Connection failed: " . $e->getMessage();
|
||
|
exit();
|
||
|
}
|
||
|
?>
|