[Solved] What to do with mysqli problems? Errors like mysqli_fetch_array(): Argument #1 must be of type mysqli_result and such

TL;DR Always have mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); in your mysqli connection code and always check the PHP errors. Always replace every PHP variable in the SQL query with a question mark, and execute the query using prepared statement. It will help to avoid syntax errors of all sorts. Explanation Sometimes your MySQLi code produces an error … Read more

[Solved] What do you think that the error_reporting(1); instruction makes? [closed]

E_ERROR is defined as 1, so it’s the same as error_reporting(E_ERROR); So basically it tells PHP only to report fatal errors. As Skilldrick says, you should use named constants, as their defined values can and will change through newer versions of PHP. One well-known such example is E_ALL, which had the following values (from the … Read more