$serverName = "tcp:ServerID.database.windows.net, 1433"; $connectionOptions = array("Database" => "DatabaseName", "UID" => "Username@ServerID", "PWD" => "password"); $conn = sqlsrv_connect($serverName, $connectionOptions); if($conn === false) { die(print_r(sqlsrv_errors(), true));