title: Fatal error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs
body: <p>I am using </p>
  
  <ul>
  <li>Xampp version 3.2.1 with PHP version 5.6.8. </li>
  <li>Microsoft Azure SQL server</li>
  </ul>
  
  <hr>
  
  <p><strong>GOAL</strong></p>
  
  <p>I am trying to create a web app that will access to my database, and be able to <strong>SELECT</strong>, <strong>INSERT</strong>, <strong>UPDATE</strong> and <strong>DELETE</strong> records. </p>
  
  <hr>
  
  <p><strong>PROBLEM</strong></p>
  
  <p>I cannot connect to the database server  </p>
  
  <hr>
  
  <p><strong>ERROR</strong></p>
  
  <blockquote>
    <p>Fatal error: Call to undefined function sqlsrv_connect() in
    C:\xampp\htdocs\BLT\Employee_Database .php on line 25</p>
  </blockquote>
  
  <hr>
  
  <p><strong>CODE</strong></p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;Title&gt;Employee Database&lt;/Title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;form method="post" action="?action=add" enctype="multipart/form-data"&gt;
      Last name &lt;input type="text" name="LastName" id="LastName"/&gt;&lt;/br&gt;
      First name &lt;input type="text" name="FirstName" id="FirstNamne"/&gt;&lt;/br&gt;
      E-mail address &lt;input type="text" name="Email" id="Email"/&gt;&lt;/br&gt;
      User Id &lt;input type="text" name="UserId" id="UserId"/&gt;&lt;/br&gt;
      Password &lt;input type="password" name="Password" id="Password"/&gt;&lt;/br&gt;
      &lt;input type="submit" name="submit" value="Submit"/&gt;
  &lt;/form&gt;
  
  &lt;?php
  $serverName = "jy4nij6vuy.database.windows.net,1433";
  $connectionOptions = array("Database" =&gt; "robertfarb",
      "UID" =&gt; "robertFarb",
      "PWD" =&gt; "******");
  $conn = sqlsrv_connect($serverName, $connectionOptions);
  
  if ($conn === false) {
      die(print_r(sqlsrv_errors(), true));
  }
  ?&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <hr>
  
  <p><strong>THIS IS WHAT I TRIED SO FAR</strong></p>
  
  <ul>
  <li>I have installed the Microsoft PHP for SQL drivers and followed all the instructions to load the driver, but it does not seem to be working! </li>
  <li>I added the <code>php_sqlsrv_56.ts.dll</code> file to the extensions folder of PHP, and also the <code>php_pdo_sqlsrv_56.ts.dll</code>. </li>
  <li>I also added the <code>extension=php_sqlsrv_56.ts.dll</code> line to the php.ini file.</li>
  </ul>
  
  <p>Any help would be much appreciated!</p>