utf 8 - bogus chars in database despite utf8 -


i have large html form, submitted script , data entered database.

for reason entered chars in database not correct. it turn ä ä

the files following:

page_varaa.php includes form form_haeverkkotunnus_data.php or if form submitted, database action.

the both php pages encoded utf-8 without bom, have

header('content-type: text/html; charset=utf-8'); 

on top of page. table has collation

utf8_unicode_ci  

and on index.php page have

<head>     <meta charset="utf-8"> 

i using msqli , enter data database:

$stmt = $db->prepare($sql); $stmt->execute() 

database engine innodb

my database has server connection colation of utf8_general_ci

despite still have bogus chars in database. missing here?

thank much

edit:

i triet set table utf8_general_ci also, did not change :(

thank cypherabe, not using pdo comment gave me right direction, had set charset mysqli, here;

http://php.net/manual/en/mysqli.set-charset.php


Comments