Guest User

Untitled

a guest
Oct 15th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. <?php
  2. $host = "";
  3. $username = "";
  4. $password = "";
  5. $dbname = "";
  6. try {
  7. $DBcon = new PDO("mysql:host=$host;dbname=$dbname", $username, $password);
  8. $DBcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  9. } catch(PDOException $error) {
  10. die($error->getMessage());
  11. }
  12. ?>
Add Comment
Please, Sign In to add comment