SQL PHP HTML ASP JavaScript articles and free scripts to download If you are facing any problem in viewing this page, please tell us
 
 

PHP MSSQL connecting script and function


WE can connect to MSSQL database by using PHP. To connect to MsSQL we have to enable the MsSQL extension support inside php.ini file. For this we have to uncomment the line saying

extension=php_mssql.dll


The status of the MSSQL support can be checked by using phpinfo function.

Once the support is available we can use different functions to handle data from MSSQL database. Now let us try for connecting to MSSQL database server.

Here are the connection steps. Note that we have used one remote db server but same string will work for a local server also.
$dbusername='username';
$dbpassword='password';
$servername='servername';
$link = mssql_connect ($servername,$dbusername,$dbpassword);


Read how to check mysql support in php by using phpinfo

ASP MsSQL connection string



Sections
PHP
JavaScript
ASP
HTML
SQL
Photoshop
Articles SEO
PHP Tutorials
PHP Monthly Planner
PHP Introduction
Loops & structure
Array
Date & Time
Functions
Form Handling
File Handling
Math Functions
String Functions
GD Functions
Comment Posting
Content Management
PHP & Ajax
Popular Tutorials
Drop down list
File Upload
Signup script
Member Login
Line Graph
PHP MySQL Paging
PHP Calendar
Subscribe
Submit your email address and receive article and product notifications. Your email is safe with us.