title: how to connect to sql server with php
body: <p>I'm new in sql server.i have application that use MySQL and now i want to use sql server instead of MySQL in that application. my php is:</p>
  
  <pre><code>&lt;?php
  $myServer = "localhost";
  $myUser = "";
  $myPass = "";
  $myDB = "UNIVERSITY"; 
  
  //connection to the database
  $dbhandle = mssql_connect($myServer, $myUser, $myPass)
   or die("Couldn't connect to SQL Server on $myServer"); 
  
  //select a database to work with
  $selected = mssql_select_db($myDB, $dbhandle)
   or die("Couldn't open database $myDB"); 
  
  //declare the SQL statement that will query the database
  $query = "SELECT clgname";
  $query .= "FROM dbo.clg ";
  
  //execute the SQL query and return records
  $result = mssql_query($query);
  
  $numRows = mssql_num_rows($result);
  if($numRows==0){
  echo "false";
  }
  else{
  echo "true";
  }
  
  //close the connection
  mssql_close($dbhandle);
  ?&gt;
  </code></pre>
  
  <p>i also remove the semi-colon before the</p>
  
  <pre><code>extension=php_mssql.dll
  </code></pre>
  
  <p>but i see error:</p>
  
  <pre><code>Fatal error: Call to undefined function mssql_connect() in C:\xampp\htdocs\1.php on line 8
  </code></pre>
  
  <p>please help. thanks.</p>