PHP – Connecting to SQL Server with Windows Authentication


<?php
$serverName      = “(local)”;
$databaseName = “TEST”;
$connectionOptions = array(“Database”=>$databaseName);

$conn = mssql_connect($serverName, $connectionOptions);

if ($conn === false){
die(FormatErrors(mssql_errors()));
}

echo ‘connection succeed!’;
?>

Advertisements