Advertisement
Guest User

Untitled

a guest
Sep 12th, 2017
568
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. @author : Shubham Maurya,
  5. Email id : maurya.shubham5@gmail.com
  6. **/
  7.  
  8. $DB_host = "localhost";
  9. $DB_user = "root";
  10. $DB_pass = "";
  11. $DB_name = "union";
  12.  
  13. try
  14. {
  15. $DBcon = new PDO("mysql:host={$DB_host};dbname={$DB_name}",$DB_user,$DB_pass);
  16. $DBcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  17. // echo "Done..";
  18. }
  19. catch(PDOException $e)
  20. {
  21. echo "ERROR : ".$e->getMessage();
  22. }
  23. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement