Is it still common practice to use this
mysql_query("SET NAMES 'utf8'");
This is the first i have seen this and from what i understand it is not widely used that much.
I plan to convert it to
mysqli_query($dbconnect, "SET NAMES 'utf8'");
Update I do see where it has to be set prior to mysqli_real_escape_string