Hi Friend
I am trying to connect my MSSql server 2008 R2 server using php. I am getting an error as below
Fatal error: Call to undefined function sqlsrv_connect() in C:\xampp\htdocs\test\connect.php on line 4
and the code is below
<?php
$serverName = "servername\sqlexpress"; //serverName\instanceName
$connectionInfo = array( "Database"=>"dbname", "UID"=>"us", "PWD"=>"ps");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if( $conn ) {
echo "Connection established.<br />";
}else{
echo "Connection could not be established.<br />";
die( print_r( sqlsrv_errors(), true));
}
?>
can any one please help me to resolve this issue