After much work, I found a solution that always works ..: without SET_NAMES.
In the conn.inc.php file conn.inc.php after you select the database and connect to it, do the following:
if(!mysqli_set_charset($conn, 'utf8')) { echo 'the connection is not in utf8'; exit(); }
... and in html always use charset utf-8;
This solved it for me. No need to use set_names() , which is good, but it annoyed me.
Pinokyo
source share