Guest User

Untitled

a guest
Jan 14th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. /*** mysql hostname ***/
  2. $hostname = 'localhost';
  3.  
  4. /*** mysql username ***/
  5. $username = 'ceginforoot';
  6.  
  7. /*** mysql password ***/
  8. $password = 'putpasswordhere';
  9.  
  10. try {
  11. $dbh = new PDO("mysql:host=$hostname;dbname=ceginfo", $username, $password);
  12. /*** echo a message saying we have connected ***/
  13. echo 'Connected to database';
  14. }
  15. catch(PDOException $e)
  16. {
  17. echo $e->getMessage();
  18. }
Add Comment
Please, Sign In to add comment