change mysql authentication error diaplay

Hi guys
I want to have my custome error display when there is a wrong user name or
pwd.
[code]
<?php
$host="localhost";
$user="root";
$password="test";

mysql_connect($host,$user,$password);
$sql="show status";
$result = mysql_query($sql);
if ($result == 0)
{
echo "<h1>Check user name or password</h1>";

"<b>Error " . mysql_errno() . ": "
. mysql_error() . "</b>";
}
else
echo "con ok";
?>
[/code]

now if I remove this

[code]
"<b>Error " . mysql_errno() . ": "
. mysql_error() . "</b>";
[/code]

I get an error. I just want to display [b]Check user name or password[/b]
when there is an error
in user id or pwd.
Any one?? Thanks




--
MySQL Windows Mailing List
For list archives: http://lists.mysql.com/win32
To unsubscribe: http://lists.mysql.com/win32?unsub=gcdmw-win32 [at] m.gmane.org
phpmerger [ Do, 16 November 2006 17:12 ] [ ID #1538031 ]
Datenbanken » gmane.comp.db.mysql.windows » change mysql authentication error diaplay

Vorheriges Thema: MAX VARCHAR Lenght
Nächstes Thema: change mysql authentication error diaplay