Moved to PHP forum.

Also the error is pretty self explanatory.

parameter 1 to be mysqli, null given which means your $dbc variable is null.