SHARE
TWEET

Untitled

a guest May 7th, 2016 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2.     // A simple PHP script demonstrating how to connect to MySQL.
  3.     // Press the 'Run' button on the top to start the web server,
  4.     // then click the URL that is emitted to the Output tab of the console.
  5.  
  6.     $servername = getenv('IP');
  7.     $username = getenv('C9_USER');
  8.     $password = "";
  9.     $database = "c9";
  10.     $dbport = 3306;
  11.  
  12.     // Create connection
  13.     $db = new mysqli($servername, $username, $password, $database, $dbport);
  14.  
  15.     // Check connection
  16.     if ($db->connect_error) {
  17.         die("Connection failed: " . $db->connect_error);
  18.     }
  19.     #echo "Connected successfully (".$db->host_info.")";
  20.    
  21. $con=$db;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top