PHP 5.5 Connection with MS SQL SERVER 2008 R2 using WAMP
<p>I need to connect to MS SQL SERVER 2008 R2 in PHP. I have followed certain tutorials but didnt solved my problems. i have used following code:</p>

<pre><code>$serverName = "DARSHAN\SQLEXPRESS"; //serverName\instanceName, portNumber (default is 1433)
$connectionInfo = array( "Database"=&gt;"trail", "UID"=&gt;"**", "PWD"=&gt;"******");
$conn = sqlsrv_connect( $serverName, $connectionInfo);

if( $conn ) {
     echo "Connection established.&lt;br /&gt;";
}else{
     echo "Connection could not be established.&lt;br /&gt;";
     die( print_r( sqlsrv_errors(), true));
}
</code></pre>

<p>this code connects with my server but when I remove UID and PWD parameters connection dont get connected. I want to use windows authentication mode. Pls help me out.</p>