Ron
Ron

Reputation: 394

connect mssql server from php

I need to connect to the mssql server using the following code but it always return me
'Something went wrong while connecting to MSSQL' I have tried many process like adding port 10.10.1.13:443\sqlnav or 10.10.1.13 but did not get any success .

mssql_connect("10.10.1.13\sqlnav","webspiders1","W3bsp1der5!") or die('Something went wrong while connecting to MSSQL');
mssql_select_db("Westmark-Production53113") or die(mssql_error());

Any help regarding this is appreciable

Thanks in advance

Upvotes: 1

Views: 153

Answers (1)

Daniel W.
Daniel W.

Reputation: 32260

You need to escape the backslash:

"10.10.1.13\\sqlnav"

Upvotes: 2

Related Questions