Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Connecting with MSSQL Server

Status
Not open for further replies.

lothadio

Programmer
Apr 5, 2001
27
SI
I am using PHP4 and I want to connect to MS SQL Server7.0 running on Win2000 server, How do I do this

Thanks


 
Use the mssql_connect function:

[tt]

$conn = mssql_connect($host,$user,$pass);
if (!$conn) {
print "Failed to connect to database";
} else {
print "Connection successful\n";
}

[/tt]

That should do it.

Setting up mssql server on your machine is a different story.

You can search around TT for other forums on how to set up mssql.

HTH.

-Vic vic cherubini
vikter@epicsoftware.com
====
Knows: Perl, HTML, JavScript, C/C++, PHP, Flash, Director
====
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top