Part of my php prints an error message directly to the html code. THe only issue is that the error message is in spanish and does not display correctly.
THe message is: "Número de calcomanía es requerido"
When I look at the page using mozilla firefox I see the following:
"N�mero de calcoman�a es requerido"
And if I view the source I see: "N�mero de calcoman�a es requerido"
When I look at the page in IE, I see: "N? de calcoman� es requerido"
And if i view the source I see: "Número de calcomanía es requerido"
Does anyone know what is causing this weirdness? I can see spanish language websites without issue in both browsers.
I am using the following code to output the message:
Code: Select all
$message = "Número de calcomanía es requerido";Code: Select all
$xml_version = "<?xml version="1.0" encoding="iso-8859-1"?".">";
$html_code = <<<EOF
$xml_version
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>$title</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
</head>
//Excess code omitted
$message<br/>
$code
</center>
</body>
</html>
EOF;
echo $html_code;