Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. <?php
  2. try {
  3. $db_host = "";
  4. $db_name = "";
  5. $db_username = "";
  6. $db_password = "";
  7. $conn = new PDO("mysql:host=$db_host;dbname=$db_name", $db_username, $db_password);
  8. $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  9. global $conn;
  10. } catch(PDOException $e) {
  11. echo 'ERROR: ' . $e->getMessage();
  12. } ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement