I want to use PHP to connect to sql server database.
I installed xampp 1.7.0(php 5.2) and SQLSRV20. I\'ve added the extensions in php.ini and I get thi
php.ini
Try this code
$serverName = "serverName\sqlexpress"; //serverName\instanceName $connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password"); $conn = sqlsrv_connect( $serverName, $connectionInfo);