Answers for "how to coonect microsoft msql server in php"

PHP
1

php connect ms sql server

<?php
$serverName = "serverName\\sqlexpress"; //serverName\instanceName

// Since UID and PWD are not specified in the $connectionInfo array,
// The connection will be attempted using Windows Authentication.
$connectionInfo = array( "Database"=>"dbName");
$conn = sqlsrv_connect$serverName$connectionInfo);

if$conn ) {
     echo "Connection established.<br />";
}else{
     echo "Connection could not be established.<br />";
     dieprint_rsqlsrv_errors(), true));
}
?>
Posted by: Guest on June-09-2020

Code answers related to "how to coonect microsoft msql server in php"

Browse Popular Code Answers by Language