Created
February 17, 2013 11:50
-
-
Save lgrz/4971171 to your computer and use it in GitHub Desktop.
Sample multipart/form-data POST with non-ASCII chars.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// utf-8 is the default setting, just to be sure for this example. | |
ini_set('default_charset', 'UTF-8'); | |
if (count($_POST)) { | |
var_dump($_POST); | |
} | |
?> | |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8" /> | |
<title>charset test</title> | |
</head> | |
<body> | |
<form action="" method="post" enctype="multipart/form-data" accept-charset="utf-8"> | |
<input type="text" name="name" value="éllo" /> | |
<input type="text" name="foo[]" value="así" /> | |
<input type="text" name="foo[]" value="comó" /> | |
<input type="text" name="foo[bar]" value="広告掲載" /> | |
<p><input type="submit" value="Continue →" /></p> | |
</form> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment