Thanks rick, that is a much cleaner solution!
"Rick Emery" <[EMAIL PROTECTED]> wrote in message 009f01c2d9c1$51171d20$0500a8c0@honeybee">news:009f01c2d9c1$51171d20$0500a8c0@honeybee... > $db = mysql_pconnect("localhost", "test1", "test1") or die(mysql_error()); > > ----- Original Message ----- > From: "ML" <[EMAIL PROTECTED]> > To: <> > Sent: Friday, February 21, 2003 9:33 AM > Subject: [PHP] Re: Mysql DB connect failure > > > Where exactly would I put the print mysql_error() ? > Here is the code... > > <?php > > @ $db = mysql_pconnect("localhost", "test1", "test1") > or > die("<body bgcolor='#000000'> > <br> > <div align='center'><table border='22'><tr><td> > <img src='./images/dbdownw.jpg'> > </td></tr></table></div> > </body>"); > > > > > > "Hans Prins" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > did you try: > > print mysql_error(); > > > > "Ml" <[EMAIL PROTECTED]> schreef in bericht > > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > > Currently I have some php code that displays a message if a connect to > my > > > database fails. Is there anyway I > > > can get a more descriptive error message? So I can see exactly why my > php > > > can't connect to the Database? > > > I am pretty sure that the username and password are correct and the > > username > > > exists as a mysql user... > > > > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php