Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- try {
- $db_host = "";
- $db_name = "";
- $db_username = "";
- $db_password = "";
- $conn = new PDO("mysql:host=$db_host;dbname=$db_name", $db_username, $db_password);
- $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- global $conn;
- } catch(PDOException $e) {
- echo 'ERROR: ' . $e->getMessage();
- } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement