Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a program with php code and I want to connect it to SQL Server
how can I do that? if you know, please help me.
Posted
Updated 22-Jan-10 9:32am
v2

PHP
<?php 
  $dbconnect = mssql_connect(".\SQLEXPRESS", $dbUser, $dbPass); 
?>

The source for this answer can be found here[^], as well as other examples and commands.
 
Share this answer
 
PHP
<?php
 
$databaseconnection = mssql_connect('server name or Locolhost', $databaseUsername, $databasePassword);

?>
 
Share this answer
 
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900