Sample PHP MSSQL connection script

Following is the sample PHP and MSSQL server connection script: <?php //SQL server details – Make necessary changes $Server = “localhost”; $User = “your_name”; $Pass = “your_password”; $DB = “example”; //Database connection $dbconn = mssql_connect($Server, $User, $Pass) or die(“Couldn’t connect to SQL Server on $Server”); //Select Database $selected = mssql_select_db($DB, $dbconn) or die(“Couldn’t open...

Scroll to top