Re: Mssql Connection

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

 



Pablo D Marotta wrote:
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>

<FONT face="Arial" color="FF0000" size=3>font</FONT> <FONT face="Arial" color="FF0000" size=3>tags</FONT> <FONT face="Arial" color="FF0000" size=3>suck</FONT>

I know nothing about MSSQL - thankgod (sorry I really can't help you there) - but I can recommend eradicating all font tags... everywhere... take no prisoners... death to frontpage (oh sorry got carried away :-). try this instead:

<p style="color: #f00; font: large Arial; text-align: center;">
# Can´t establish connection with database server pc.
</p>


rgds, Jochem

</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;
}


-- 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