I have a large html form, which is submitted to a script and then data is entered into database.
For some reason my entered chars in database are not correct. It turn ä into ä
The files are the following:
page_varaa.php which includes the form form_haeverkkotunnus_data.php or if form is submitted, it does the database action.
The both php pages are encoded as UTF-8 without BOM, have a
header('Content-Type: text/html; charset=utf-8');
on top of the page. The table itself has collation
utf8_unicode_ci
and on the index.php page I have
<head>
<meta charset="utf-8">
I am using the msqli and enter the data like this into database:
$stmt = $db->prepare($sql);
$stmt->execute()
Database engine is innoDB
My database has a server connection colation of utf8_general_ci
Despite all this still I have bogus chars in database. What am I missing here?
Thank you so much
edit:
I triet to set table utf8_general_ci also, did not change anything :(