I have written this small test script:
<html>
<body>
<?php
if ($_POST['amount'])
{ foreach ($_POST as $key => $in)
{ echo $key;
echo "=";
echo $in;
echo "<br />";
}
exit ('</body></html>');
}
?>
Form output:
<form id='transfer' method='POST' action='transfer.php'>
<input type='hidden' name='touser' value="inge">
<input type='hidden' name='amount' value="1000">
<input type='hidden' name='note' value='Contratulations! You won!'>
<input type='hidden' name='action' value='transfer'>
</form>
<script type="text/JavaScript">
function Submit(form)
{ document.getElementById(form).submit();
}
Submit('transfer');
</script>
</body>
</html>
The script works, but I would like to sent the POST data using the php "header" function instead so the headers don't pass from the client.
The problem is that I can't find any description of the format to be used.
Even in a comprehensive php book I can't find anything about it.
Can anyone help?