Advertisement
Guest User

Untitled

a guest
Apr 15th, 2016
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php
  2. /**
  3. * Created by PhpStorm.
  4. * User: root
  5. * Date: 11/04/16
  6. * Time: 14:44
  7. */
  8. class dbconfig{
  9.  
  10. protected $DB_DSN;
  11. protected $DB_USERNAME;
  12. protected $DB_PASSWORD;
  13. protected $DB_NAME;
  14. public $ADMIN_USER;
  15. public $ADMIN_PASSWORD;
  16. public $DB;
  17.  
  18. public function connect()
  19. {
  20. $DB_DSN = "localhost";
  21. $DB_USERNAME = "baine101";
  22. $DB_PASSWORD = "blink182";
  23. $DB_NAME = "Pestproof";
  24.  
  25. $DB = new PDO("mysql:host=$DB_DSN;dbname=$DB_NAME",$DB_USERNAME,$DB_PASSWORD);
  26. $DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  27. //admin panel login
  28. define("ADMIN_USER", "admin");
  29. define("ADMIN_PASSWORD", "mypass");
  30. // define("ADMIN_PASSWORD", "a029d0df84eb5549c641e04a9ef389e5");
  31.  
  32. return true;
  33.  
  34. //close function connect
  35. }
  36. //close class
  37. }
  38.  
  39.  
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement