Advertisement
Guest User

Untitled

a guest
Apr 10th, 2019
118
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="UTF-8">
  4. <title></title>
  5. </head>
  6. <body>
  7. <?php
  8. $db_host = "localhost";
  9. $db_name = "database_emp";
  10. $db_user = "root";
  11. $db_pass = "";
  12.  
  13. try{
  14. $db_con = new PDO("mysql:host={$db_host};dbname={$db_name}",$db_user,$db_pass);
  15. $db_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  16. }
  17. catch(PDOException $e){
  18. echo $e->getMessage();
  19. }
  20.  
  21.  
  22. ?>
  23. </body>
  24. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement