
Originally Posted by
renan7899
The error reporting will print your IP and some other environment errors. the mysql error will just print what error happened in that query.
I don't get what you are trying to say here. I know what mysql_error() does, and I know what error_reporting(0) does. Giving the end user either of these is silly and pointless. If you want to allow them to be togglable have an
Code:
if(isset($_GET['debug'])){
error_reporting(E_ALL);
define("DEBUG", true);
} else {
error_reporting(0);
define("DEBUG", false);
}
And then check the query like so
Code:
if($conn){
//connected just fine
$query = mysql_query("select `bla` from `derp`");
if(query){
//query succeeded
} else {
if(DEBUG){
mysql_error();
}
echo "Unable to change password, please try again later";
}
} else {
if(DEBUG){
mysql_error();
}
echo "Password change script isnt working!";
}

Originally Posted by
renan7899
And das, stop trying to find "errors" in everything that I post on the forum.
You have mentioned that you are rather young. If anything you should take what I say as decent advice as writing robust code is a good habit to learn early in all honesty. I may dislike you some due to stupid things you do, but I'm simply trying to assist you. After all it affects many people when bad code gets circulated around with no one ever pointing out why it is bad or giving hints on how it make it better.