Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // Information needed to connect to the database
- $dsn = 'mysql:dbname=uzakova_db;host=uzakova.eas-cs2410-1516.aston.ac.uk';
- $username = "uzakova";
- $password = "";
- try
- {
- //Opens the connection to the database
- $db = new PDO($dsn, $username, $password);
- $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }
- catch(PDOException $ex)
- {
- // Not using getMessage method due to security(ie provides some info)
- header("location: error.php");
- }
- session_start();
- ?>
Add Comment
Please, Sign In to add comment