Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2016
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. <?php
  2. //This allows you to connect to your DB
  3. //connection credentials
  4. $servername = getenv("IP");
  5. $username = getenv("C9_USER");
  6. $password = "";
  7. $database = "lakehub";
  8. $dbport = 3306;
  9.  
  10. //Connect to DB
  11. $db = new mysqli($servername, $username, $password, $database,$dbport);
  12.  
  13. //Call
  14.  
  15. if($db->connect_error){
  16. header('content-type: text/plain');
  17.  
  18. die("error encountered.");
  19. }
  20. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement