Re: Can't read $_POST array

From: Date: Wed, 18 Aug 2010 21:22:40 +0000
Subject: Re: Can't read $_POST array
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-307552@lists.php.net to get a copy of this message
This was the complete code of the page (this is the POST version not the REQUEST version): <?php $response = print_r($_POST, true); echo $response; ?> Returns an empty array no matter what POST vars are sent. We fixed it by changing it to this, which I've never even heard of, but so far is working perfectly: <?php $response = file_get_contents('php://input'); echo $response; ?> I have no idea what the problem was. Thanks to everyone for your help.

« previous php.general (#307552) next »