Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2017
102
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. // here i connect to the database that I have created
  3. $server = 'nadinesusannaronnby.dk.mysql';
  4. $username = '***';//secret
  5. $password = '***';//secret
  6. $database = 'nadinesusannaronnby_dk_nadinio';
  7. //if connection fails the script will stop and a message will appear
  8. try{
  9. $conn = new PDO("mysql:host=$server;dbname=$database;", $username, $password);
  10.  
  11. } catch(PDOException $e){
  12. die( "Connection failed: " . $e->getMessage());
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement