title: How to connect sql server with php using xampp?
body: <p>I am trying to connect my SQL server with PHP using Xampp. I have already uploaded dll files in the ext folder but I am unable to connect it.
  My PHP version is 7.2.6.
  Uploaded dll files are - php_pdo_sqlsrv_72_ts.dll, php_sqlsrv_72_ts.dll.
  I have written this code to connect my SQL database with PHP-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php   
  $serverName = "INDO-SERV\SQLEXPRESS,1443";  
  $uid = "sa";     
  $pwd = "XXXXXX";    
  $databaseName = "web";  
  $connectionInfo = array("UID" =&gt; $uid, "PWD" =&gt; $pwd, "Database"=&gt;$databaseName);  
  $conn = sqlsrv_connect( $serverName, $connectionInfo);  
  if( $conn )  
  {  
       echo "Connection established.\n";  
  }  
  else  
  {  
       echo "Connection could not be established.\n";  
       die( print_r( sqlsrv_errors(), true));  
  }  
  sqlsrv_close( $conn);  
  ?&gt;     
   
   </code></pre>
  </div>
  </div>
  </p>
  
  <p>I am getting this error when I had tried this- </p>
  
  <blockquote>
    <p>Fatal error: Uncaught Error: Call to undefined function
    sqlsrv_connect() in C:\xampp\htdocs\biometric\db.php:7 Stack trace: #0
    {main} thrown in C:\xampp\htdocs\biometric\db.php on line 7.</p>
  </blockquote>
  
  <p>Anyone has an idea where I am doing wrong or how to connect with the database.</p>