Last updated on August 29th, 2020 at 09:33 am
<div class="php">
<span>Some Data Here</span>
</div>
Array
(
[theInput] => <div class="php">
<span>Some Data Here</span>
</div>
)
$phpRaw = file_get_contents('php://input');
$theInput = htmlspecialchars(urldecode($phpRaw));
theInput=<div class="php">
<span>Some Data Here</span>
</div>
Here, theInput is the name of the textarea in the form that I submitted.
But there is a problem, what I got is a string containing all the submitted data, that is all index and values in an query string style, right? So how I can get the value of a given index from this string?
Well nothing to worry, read this, how to get variable value from URL query string in PHP? And use the second method described in the post which is Get variable’s value from string like the query part of an URL in PHP