Advertisement
Guest User

Untitled

a guest
Nov 25th, 2014
176
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. // Reading in ".ini" file with personal login info
  2. $login_file = file("login.ini");
  3. $database = explode('=', $login_file[0]);
  4. $DATABASE = trim($database[1]);
  5. $password = explode('=', $login_file[1]);
  6. $PASSWORD = trim($password[1]);
  7. $user = explode('=', $login_file[2]);
  8. $USER = trim($user[1]);
  9. $host = explode('=', $login_file[3]);
  10. $HOST = trim($host[1]);
  11.  
  12. //Connecting to mysql server
  13. $connection = mysqli_connect($HOST, $USER, $PASSWORD);
  14. //Selecting the database
  15. $db = mysqli_select_db($connection, $DATABASE) or die ("Could not select database");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement