My problem is that I want to connect to my MSSQL 2000 database using PHP.
It works fine when I use asp-code, but with PHP I can't connect.
My code in asp looks like this:
<%
Dim objConn
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionString="Driver={SQL Server};Server=FOOGY;Database=test;UID=;PWD="
objConn.Open
%>
I get no errors!
My code in php looks like this:
<?
$hostname = "FOOGY";
$username = "";
$password = "";
MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND.");
?>
I get this error:
Warning: MS SQL message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection. (severity 14) in E:\Mina_Dokument\Internet\Hemsidor\Startsida\temp\mssql.php on line 7
Warning: MS SQL: Unable to connect to server: FOOGY in E:\Mina_Dokument\Internet\Hemsidor\Startsida\temp\mssql.php on line 7
DATABASE FAILED TO RESPOND.
Anybody with the same problem that can help me?