how to connect php with mssql server

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

Moderators: egami, macek, gesf

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

Wed Nov 14, 2012 10:30 am

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

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

Sat Apr 09, 2016 5:13 am


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


Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 0 guests