Guest User

Untitled

a guest
May 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. class ShoppingCartMySQL {
  3.  
  4. protected $db;
  5.  
  6. public function __construct ( )
  7. {
  8. try {
  9. $this->db = new PDO(
  10. '---',
  11. '---',
  12. '---'
  13. );
  14. echo 'Connected to database';
  15. }
  16. catch(PDOException $e) {
  17. echo 'Connection to database failed. Database reports: ' . '<br>' . $e->getMessage();
  18. }
  19. }
  20. ?>
Add Comment
Please, Sign In to add comment