set charset causing page to crash
I'm trying to get rid of those diamonds that appear when characters are entered into the database that don't fit the charset.
I added the line <?php $mysqli->set_charset("utf8"); ?> on the web page, but got an error "Call to a member function set_charset() on null in..."
I also tried to add a meta tag but that did nothing.
Can you advise on where to place this code to make it work? Or is there a better way to do it?