0

I have a simple test form in html responseTest.html

<html>
    <body>
        <form action="catchResponse.php" method="POST">
            <input type="hidden" name="test" value="not empty" />
        </form>
    </body>
</html>

And I've got a simple catchResponse.php:

<?
include('config.php');
$obj=file_get_contents('php://input');
$fp=fopen('response2.txt','w+');
fwrite($fp,print_r($obj));
?>

If I run responseTest.html, response2.txt is empty. I'm clearly missing something basic here but cannot find it.

Alberto
  • 674
  • 13
  • 25
Jeroen Swets
  • 215
  • 1
  • 6
  • 17

0 Answers0