how to connect php with mssql server

Do you have questions regarding other database enginges (not MySQL) -- ask here!

Moderators: macek, egami, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: how to connect php with mssql server

Post by seandisanti » Wed Nov 14, 2012 10:30 am

what are you writing, and what error are you getting? are you using wamp server?

johnmacd
New php-forum User
New php-forum User
Posts: 75
Joined: Wed Jun 12, 2013 9:30 pm
Contact:

Re: how to connect php with mssql server

Post by johnmacd » Sat Apr 09, 2016 5:13 am

Hi,

Try this:
$serverName = "serverName\sqlexpress"; //serverName\instanceName
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);


Thanks

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests