Guest User

Untitled

a guest
Oct 22nd, 2018
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. <?php
  2.  
  3. $db_name = "sport24";
  4. $db_user = "root";
  5. $db_pass = "";
  6. $db_host = "localhost";
  7.  
  8. try {
  9. $db = new PDO("mysql:host=".$db_host.";dbname=".$db_name."", $db_user, $db_pass);
  10. $db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  11. }
  12. catch(PDOException $e) {
  13. echo $e->getMessage();
  14. }
  15.  
  16.  
  17. ?>
Add Comment
Please, Sign In to add comment