0
How to make a Link between Php and Sql server
How to established link between Php and Sql database
2 Answers
0
php 7:
sqlsrv_connect â Opens a connection to a Microsoft SQL Server database
sqlsrv_connect ( string $serverName [, array $connectionInfo ] ) :
Opens a connection to a Microsoft SQL Server database. By default, the connection is attempted using Windows Authentication. To connect using SQL Server Authentication, include "UID" and "PWD" in the connection options array.
$serverName = "serverName\sqlexpress"; //serverName\instanceName
$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password");
$conn = sqlsrv_connect( $serverName, $connectionInfo);
if your using sqlsrv_connect you have to download and install MS sql driver for your php!
0
echo("Tq so much bro");