Reply to Re: [PHP] Mssql Connection

Your name:

Reply:


Posted by Jochem Maas on 01/19/05 23:40

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

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация