when a query doesn’t match e.g user name and password, the localhost returns an warning message. how can i turn it off?
i think there is some Can someone guide me please?
waning message is this
Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 2 in /var/www/login/loginform.php on line 24
You really should fix whatever's causing the warning, but you can hide / show errors with error_reporting. To hide warning messages, you could use something like this:
error_reporting(E_ERROR | E_PARSE);
Edit your PHP.ini file :
Set these two lines as :
display_errors = Off
display_startup_errors = Off
You must fix your code rather turning it off. If you want to off warnings you can set it in php.ini of your server. Set
error_reporting = E_ALL & ~E_NOTICE
I recommend doing this globally is not a good idea. So do it in your project using PHP. To do this you can use PHP function
error_reporting(E_ALL ^ E_NOTICE);
Put this function before where your code starts execution.