Page MenuHomePhorge
Authored By
pokorra
Apr 28 2016, 3:44 PM
Size
830 B
Referenced Files
None
Subscribers
None

test.php

<?php
echo "TEST";
echo "see also http://stackoverflow.com/questions/5077969/php-some-post-values-missing-but-are-present-in-php-input";
function real_post() {
static $post;
if (!isset($post)) {
$pairs = explode("&", file_get_contents("php://input"));
$post = array();
foreach ($pairs as $pair) {
$x = explode("=", $pair);
echo "<pre>".($x[1]) . " ". rawurldecode($x[1])."</pre>";
$post[rawurldecode($x[0])] = rawurldecode($x[1]);
}
}
return $post;
}
if (isset($_POST["test"])) {
echo "<pre>".($_POST["test"])."</pre><br/>";
echo "<pre>".print_r(real_post(),true)."</pre><br/>";
//$raw_post = file_get_contents('php://input');
//echo $raw_post."<br/>";
}
?>
<form action="test.php" method="POST">
<input name="test" value="test<test" type="text">
<input type="submit" value="submit">
</form>

File Metadata

Mime Type
text/x-php
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140661
Default Alt Text
test.php (830 B)

Event Timeline