Mssql Connection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi there..
I´m connecting to a Ms Sql Server 2000, with the system administrator´s name,
and its password.
It always works fine, but... I know it´s not the safest way of connecting, so I
want to use some ordinary user names and passwords.

The problem is that I just can´t make it work, it always throws username
errors.

How should I configure this, in order to connect to mssql with ordinary
usernames and passwords from php code?

Here is my function code:

function conectar ()
{
      $conexion = mssql_connect("localhost","sa","apr");
      if (!$conexion)
      {
?>
<DIV align="center">
  <FONT face="Arial" color="FF0000" size=3>
    <B># Can´t establish connection with database server pc.</B>
  </FONT>
</DIV>
<?php
            exit (0);
      }
      if (!mssql_select_db(GES_WEB))
      {
?>
<DIV align="center">
  <FONT face="Arial" color="FF0000" size=3>
    <B># Can´t establish connection with the specified database.</B>
  </FONT>
</DIV>
<?php
            exit (0);
      }
      return $conexion;
}

Thanks!!

Pablo



American Express made the following
 annotations on 01/19/05 13:57:56
------------------------------------------------------------------------------
******************************************************************************

     "This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited.  If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments.  Thank you."

******************************************************************************

==============================================================================

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux