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



Reply via email to