I am using the current code in attempt to access a msSQL 2005 db:
First try to do something like phpinfo()
on your browser, than see which databases are allowed.
If you don't see anything like mssql
then it is not configured. So use the odbc_connect()
which will be configured...your connection string will be like this:
$server = '';
$user = '';
$password = '';
$database = '';
$connection = odbc_connect("Driver={SQL Server Native Client `11.0};Server=$server;Database=$database;", $user, $password);`
If you are using mssql 2005 or 2008, then change d 11.0 to 10.0 and for other versions just change to the version of your mssql.