<?php
$serverName = “serverNamesql”; //serverNameinstanceName
// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connection = array( “Database”=>”hotel”);
$con = sqlsrv_connect( $serverName, $connection);
if( $conn ) {
echo “Database Connected<br />”;
}else{
echo “Database not Connected<br />”;
die( print_r( sqlsrv_errors(), true));
}
?>
Question and answer is powered by AnsPress.io