I am trying to submit a form with HTML data in it to my server, but it appears to be stripping it out and I cant seem to figure out why.
If I do file_get_contents("php://input")
I can see my content in the raw form:
action=submit&content=%3Cp%3EAnteater+Alumni%3A+Help+current+UCI+students+reach+their+goal+of+raising+%2...registration+form%3C%2Fa%3E.%3C%2Fp%3E
But If I do print_r($_POST['content']);
I see the text WITHOUT any html formatting. It is like PHP is stripping it out somehow.
I tried the following:
$data = file_get_contents("php://input");
$output = array();
parse_str($data, $output);
But this just outputs an empty array
magic_quotes_gpc
is off. I have nothing else in the script modifying the content in any way.
Any ideas at all?
UPDATE: I am aware of the HTML being displayed in the browser. I am using a browser as well as curl
, and dumping the content as text/plain
-- the HTML formatting in the browser is not the problem.