Search code examples
phpsql-server-2008-r2wamp

How connect php and sql server 2008 R2 using wamp server


Already changed file php.ini And the index.php file contains:

<?php
$server = 'name/SQLEXPRESS';
$link = mssql_connect($server, 'namepc', 'pw');
if (!$link) {
    die('Something went wrong');
}
?>

And the error message on the localhost is:

Warning: mssql_connect() [function.mssql-connect]:. (severity 14)

Warning: mssql_connect() [function.mssql-connect]: Unable to connect to server: Something went wrong


Solution

  • Already made it! Just create a new usser on managment studio and linked it the new accound to your php code.