<?php
//1und1 compatible php login code
ini_set ( 'mysqli.default_socket', '/tmp/mysql5.sock' );
//database connection
$db = new mysqli('localhost', 'username', 'password', 'databasename');
$db->set_charset("utf8");
if($db->connect_errno > 0){
    die('Unable to connect to database [' . $db->connect_error . ']');
}



?>