note 82324 rejected from function.mssql-connect by tularis
| From: | tularis@php.net | Date: | Sun, 06 Apr 2008 12:51:55 +0000 |
| Subject: | note 82324 rejected from function.mssql-connect by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-137977@lists.php.net to get a copy of this message | ||
Note Submitter: Jim - jim at websbydesign dot net
----
I have been trying to get connected to my MSSQL2005 via php and I'm having troubles. can
someone please look at my code and tell me what I am doing wrong. I dont beleive I need to use a
Named Pipe because using asp I can simple use the local IP address to connect. I have copied the
correct DLL file to my php server (Windows 2003 Ent) so I am thinking I am just not writting the
code correctly, yes I am new at this.
<?php
//Server and login Info
$SERVER = '192.168.1.9';
$USER_NAME = "name";
$USER_PASS = "password";
$DATABASE = "database";
//Connecting to the server
$CONN = mssql_connect($SERVER, $USER_NAME, $USER_PASS)
or die ("Can't connect to Microsoft SQL Server");
//Selecting the database
mssql_select_db($DATABASE, $CONN)
or die ("Can't connect to Database");
?>