title: Connect sql server 2005 using PHP
body: <p>I'm trying to connect SQL Server 2005 using PHP. I searched in Google but am not getting proper solution, it's showing search results about <code>mssql_connect()</code> is not working properly. By seeing this am not getting anything.</p>
  
  <pre><code>      require_once 'login.php';
       $db_server = mysql_connect($db_hostname, $db_username, $db_password);
       mysql_select_db($db_database) or die("Unable to connect to database: ".mysql_error());
  </code></pre>
  
  <p>This will connect mysql database. I tried replace <code>mysql_connect()</code> with <code>mssql_connect()</code>. But its not working. <code>login.php</code> has</p>
  
  <pre><code>  $db_hostname = 'localhost';
    $db_database = 'urlstore';
    $db_username = 'root';
    $db_password = 'tiger';
  </code></pre>
  
  <p>How can I connect SQL database using PHP. </p>