Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $host = "localhost";
- $user = "root";
- $pass = '';
- $db = "xxxxxx";
- try {
- $conn = new PDO("mysql:host=$host;dbname=$db", $user, $pass);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- }
- catch(PDOException $e)
- {
- echo "Connection failed: " . $e->getMessage();
- }
- ?>
Add Comment
Please, Sign In to add comment