Jump to content

php mysql without error reporting


andyd34

Recommended Posts

I am trying to check if a given set of vaiables connects or fails to connect to a mysql database without triggering an error because I want to create my own error messages.

 

The reason for this is the connection is being tested in jquery so the form will be submitted without page refresh and if the error reporting is on it just looks like you click a button for nothing

 

can anybody help

Link to comment
https://forums.phpfreaks.com/topic/194420-php-mysql-without-error-reporting/
Share on other sites

I think I may have made my question a bit vague

 

I am creating an install script and want to check if the information entered is correct for instance

 

mysql name

mysql host

mysql user

mysql password

 

if i use

if(mysql_connect(host, user, password)
{
    // do something
}
else
{
   // do something else
}

 

Its just trigerring the inbuilt error which jquery doesnt recognise for some reason, I want to trigger my own response ie, true or false so I can then pass it client side

 

Thanks anyway

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.