title: how to connect my hosted php website to SQL Server Database on my local server
body: <p>I have a php website hosted in <em>1and1.com</em>, but when I connect to our local server database(windows server 2012 and sql server 2012) it gives me no luck, it gives me this error:</p>
  
  <pre><code>Call to undefined function sqlsrv_connect() in dbconn.php on line 9.
  </code></pre>
  
  <p>here's my database connection:</p>
  
  <pre><code>&lt;?php   
  
      $serverName='xxx.xxx.00.xx'; //&lt;-- should I include PORT here? 
      $connectionInfo=array(
                      'Database'=&gt;'DBName',
                      'UID'=&gt;'userName',
                      "PWD"=&gt;'Password');
  
      $conn = sqlsrv_connect($serverName,$connectionInfo); //&lt;-- line 9 here
  
      if($conn){
          //echo 'Connection Established!&lt;br /&gt;';
      }else{
          //echo 'Connection Failed!&lt;br /&gt;';
          die(print_r(sqlsrv_errors(),TRUE));
      }   
  
  ?&gt;
  </code></pre>
  
  <p>Actually, I'm confused what to use.. like should I use <em>IIS</em> here or other procedures but for development, I used <code>XAMPP</code> to test my website. </p>
  
  <p>I'm new with  this kind of stuff, so if you can provide me some step by step articles for this is much more appreciated.</p>
  
  <p>Thanks in advance! </p>