PHP MySQLI code not workingPHP MySQLI code not working $q = "UPDATE users SET password = '6c55803d6f1d7a177a0db3eb4b343b0d50f9c111' WHERE id = '1';"; mysqli_query($dbc, $q); Dot knows but some cause it keeps giving me the following error: Warning: mysqli_query() Expects parameter 1 to be mysqli, null given Can anyone help me Thanks in advanc
If you used functional coding you need add global var in your function Fo example: $DataBase = mysqli_connect("localhost", "test", "illusions", "test"); function test() { global $Database; }
It's hard to help with your problem without code. You need check $dbc, - it's must be MySQL resource id but not null