Hello,
I have a form that visitors use to request product information. Our customers are from all over the world and I seem to be having a problem when processing the form with foreign characters.
This is what I get in my database (mysql) and my email:
Eszterházy Károly University
And here is what it is suppose to look like:
Eszterházy Károly
Here is the code I use to escape for the mysql database:
//loop through the array and escape all of the elements
foreach($formValues as $key => $arrItems) {
$formValues[$key] = mysql_real_escape_string($arrItems);
}
And here is the code I use to prep the data for email:
//build email body
foreach($_POST as $label => $bodyValue) {
if($bodyValue != NULL) {
$body .= $label .": ". htmlentities($bodyValue) ."<br />";
}
}
Any help on how to fix this so all characters display correctly would be greatly appreciated. Thanks.