Show sourcecode
The following files exists in this folder. Click to view.
config.php
connect_db.php
db_handler.php
footer.php
header.php
ovn_incl1.php
ovn_incl2_end.php
ovn_incl2_start.php
ovn_incl3.php
ovn_incl4_end.php
ovn_incl4_start.php
connect_db.php
22 lines ASCII Windows (CRLF)
<?php
if (!$remote) {
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "mydb";
} else {
$servername = "localhost";
$username = "pavvor23";
$password = "z8_asVQU";
$dbname = "pavvor23";
}
try {
$conn = new PDO("mysql:host=$servername;dbname=$dbname", $username, $password);
// set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
} catch(PDOException $e) {
echo "Connection failed: " . $e->getMessage();
exit();
}
?>