Advertisement
Guest User

Untitled

a guest
Apr 29th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2. require 'functions.php';
  3. session_start();
  4.  
  5. $DB_host = "localhost";
  6. $DB_user = "root";
  7. $DB_pass = "";
  8. $DB_name = "task_manager";
  9.  
  10. try
  11. {
  12. $DB_con = new PDO("mysql:host={$DB_host};dbname={$DB_name}",$DB_user,$DB_pass);
  13. $DB_con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  14. }
  15. catch(PDOException $e)
  16. {
  17. echo $e->getMessage();
  18. }
  19.  
  20.  
  21. include_once 'Db_handlers.php';
  22. include_once 'userstask.php';
  23. $db = new DbHandler($DB_con);
  24. $task = new Usertask($DB_con);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement