cleaner
04-12-2010, 04:02 PM
hi,
I have a script that retrieves XML via POST which is working fine:
if (isset($_POST) && $_POST != null) {
$string = $_POST["thexml"];
}
<html>
<body>
<form action="test.php" enctype="text/xml" method="POST">
<textarea name="thexml" id="thexml" rows="5" cols="60">
<xml>this works</xml>
</textarea>
<input type="submit">
</form>
However, external XML POST's may be sent to me, and I don't know what the variable name is for $_POST["thexml"] as they could be using $_POST["data"] or something else.
How can I retrieve the posted information without knowing the name of the field they used to post the data? Is a field name always used?
Thanks for your help.
I have a script that retrieves XML via POST which is working fine:
if (isset($_POST) && $_POST != null) {
$string = $_POST["thexml"];
}
<html>
<body>
<form action="test.php" enctype="text/xml" method="POST">
<textarea name="thexml" id="thexml" rows="5" cols="60">
<xml>this works</xml>
</textarea>
<input type="submit">
</form>
However, external XML POST's may be sent to me, and I don't know what the variable name is for $_POST["thexml"] as they could be using $_POST["data"] or something else.
How can I retrieve the posted information without knowing the name of the field they used to post the data? Is a field name always used?
Thanks for your help.