views:

51

answers:

2

Hi people,

I used xampp for php and mysql. But i need to work with php and sql server 2008. can any body help me providing any link or tutorial that describes the configuration for php and sql server?

Is there any software like xampp(php-mysql) that provides built in php-sqlserver?

A: 

Install MS SQL server as usual then use the following connect command:

http://php.net/manual/en/function.mssql-connect.php

<?php
// Server in the this format: <computer>\<instance name> or 
// <server>,<port> when using a non default port number
$server = 'KALLESPC\SQLEXPRESS';

// Connect to MSSQL
$link = mssql_connect($server, 'sa', 'phpfi');

if (!$link) {
    die('Something went wrong while connecting to MSSQL');
}
?>
Jon Winstanley
A: 

Here's a tutorial about installation of MSSQL/PHP example connection script from Moodle.

easement