change mysql authentication error diaplay

"phpmerger" <[email protected]> Thu, 16 Nov 2006 08:11:50 -0800
Newsgroups gmane.comp.db.mysql.windows
Message-ID <[email protected]>
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/[email protected]