phpvira

connection.php

Oct 4th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. $servername = 'localhost';
  4. $db_name = 'ispit1';
  5. $username = 'root';
  6. $password = '';
  7.  
  8.  
  9. try{
  10.  
  11. $db = new PDO('mysql:host=' .$servername.
  12. ';dbname=' .$db_name. ';charset=utf8', $username, $password);
  13. } catch (Exception $e){
  14. echo $e->getMessage();
  15. }
  16.  
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23. ?>
Add Comment
Please, Sign In to add comment