Page 1 of 1

php Post Help

Posted: Mon Dec 29, 2008 1:31 pm
by namliw
Hi i'm trying to post and xml trought post using curl, but for some reason the xml it's not being posted to the page, I've created a html file and post the values using a form but the xml is still not being posted, any ideas ?

Code: Select all

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
 
<body>
<?php foreach($_POST as $key => $val)
        echo "<br> $key => $val";
        print_r($_POST);
?>
<table width="723" height="360" border="1">
  <tr>
    <td><form id="form1" enctype="text/plain" name="form1" method="post" action="index.php"><input type="hidden" value="algo"  name="algo" />
      <textarea name="textarea" id="textarea" cols="45" rows="5"><?xml version="1.0" encoding="UTF-8"?>
<OTA_VehAvailRateRQ xmlns="http://www.opentravel.org/OTA/2003/05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opentravel.org/OTA/2003/05 OTA_VehAvailRateRQ.xsd" Version="1.00" MaxResponses="10">
    <POS>
        <Source AgentDutyCode="xxxxxxxxx">
            <RequestorID Type="x" ID="xxx3">
                <CompanyName Code="xx" CodeContext="xxxx"/>
            </RequestorID>
        </Source>
    </POS>
<VehAvailRQCore Status="All">
        <VehRentalCore PickUpDateTime="2009-05-15T15:45:00" ReturnDateTime="2009-06-18T13:30:00">
            <PickUpLocation LocationCode="LAX"/>
            <ReturnLocation LocationCode="LAX"/>
</VehRentalCore>
    </VehAvailRQCore>
</OTA_VehAvailRateRQ></textarea>
      <input type="submit" name="button" id="button" value="Submit" />
    </form></td>
  </tr>
</table>
</body>
</html>
I know that text/plain could cause errors but even when i remove the problem continues,

Thanks just for reading this.