Problems with characters like ÖÄÅ

Oxiltontola

New Member
My form \[code\]<form action="saveProfile.php" method="post" name="ProfileUpdate" id="ProfileUpdate" ><input name="Smeknamn" id="Smeknamn" type="text" value="http://stackoverflow.com/questions/3645668/<?php echo $v["user_name"]; ?>" maxlength="16" id="ctl00_ctl00_cphContent_cphContent_cphContentLeft_tbUsername" onkeydown="return ((event.keyCode != 16) || (event.keyCode == 16 && this.value.length >= 1));" style="width: 130px;" /></form>\[/code\]When I try to \[code\]echo $_POST["Smeknamn"];\[/code\] on saveProfile.php i get \[code\]??????\[/code\] on the characters \[code\]? ? ?\[/code\]Why is this happening? \[code\]saveProfile\[/code\] AND \[code\]editProfile\[/code\] is encoded in UTF-8 without BOM, and meta utf8 and all that.UPDATE UPDATE$smeknamn = $data["Smeknamn"]Sorry forgot to mention that i had this foreach.And its $smeknamn im echoing and getting ??????.I just tried $_POST["Smeknamn"] and it echo out ??? just fine.. So the problem is now in the foreach() that makes the ??? chars ??????. How can i fix this?\[code\]foreach($_POST as $key => $value) { $data[$key] = filter($value);}function filter($data) { $data = http://stackoverflow.com/questions/3645668/trim(htmlentities(strip_tags($data))); if (get_magic_quotes_gpc()) $data = stripslashes($data); $data = mysql_real_escape_string($data); return $data;}\[/code\]
 
Back
Top