I have problem when post data in php that contain special character:
String: ? < > ' - \" `´& % ‰ € ® 2011
that always display
String: ? < > ' - " `´& % ‰ € ® 2011
i changed form attribute be:
<form id="frmBlog"method="post" enctype="multipart/form-data">
and also i change html with meta attribute:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
but the result still same. anyone can help to fix this problem. thank you
my simple code:
<?php
if(isset($_POST['submit'])){
echo $_POST['content'];
exit;
}
$content = "String: ? < > ' - \" ´& % ‰ € ® 2011";
?>
<html lang="en">
<head>
<title>Test</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<form method="post">
<textarea name="content" rows="20"><?=
$content
?></textarea>
<input type="submit" name="submit" value="submit" />
</form>
</body>
</html>
output:
String: ? < > ' - " ´& % ‰ € ® 2011