Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Reading in ".ini" file with personal login info
- $login_file = file("login.ini");
- $database = explode('=', $login_file[0]);
- $DATABASE = trim($database[1]);
- $password = explode('=', $login_file[1]);
- $PASSWORD = trim($password[1]);
- $user = explode('=', $login_file[2]);
- $USER = trim($user[1]);
- $host = explode('=', $login_file[3]);
- $HOST = trim($host[1]);
- //Connecting to mysql server
- $connection = mysqli_connect($HOST, $USER, $PASSWORD);
- //Selecting the database
- $db = mysqli_select_db($connection, $DATABASE) or die ("Could not select database");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement