Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. $dsn = 'mysql:host=localhost;dbname=kungfu_panda_shop';
  3. $username = 'web_user';
  4. $password = 'shifu88';
  5.  
  6. try {
  7. $db = new PDO($dsn, $username, $password);
  8. //echo "Successful in connecting to database<br>\n"; <!--program stops here if you dont comment this out -->
  9. } catch (PDOException $e) {
  10. $error_message = $e->getMessage();
  11. //echo $error_message;
  12. include('eg008b_database_error.php');
  13. exit;
  14. }
  15.  
  16.  
  17.  
  18.  
  19.  
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement