Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host = "localhost";
- $dbname = "dbquest";
- $username = "root";
- $password = "";
- try {
- $db = new PDO("mysql:host={$host};dbname={$dbname}", $username, $password);
- $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- } catch (PDOException $exception){
- die("Connection error: " . $exception->getMessage());
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement