Link to home
Start Free TrialLog in
Avatar of NEComputer
NEComputerFlag for United States of America

asked on

How to send xml data using php?

So I have three variables
So I have the following values:

$item = "Some Item";
$price = "$1000.00";
$quantity = "25";

and I want to send the data to a company,

$receiver = "http://www.examplecompany.com/xml/order.asp;

the xml doc example they sent shows:

<methodCall>
<methodName>order</methodName>
<params>
    <param>
         <value>
             <struct>
                   <member><name>username</name><value><string>TEST</string></value></member>
                   <member><name>password</name><value><string>TESTPASS</string></value></member>
                   <member><name>item</name><value><string>Example Item(place php var)</string></value></member>
                   <member><name>price</name><value><string>$500(php price var)</string></value></member>
                   <member><name>quantity</name><value><string>25(php quantity var)</string></value></member>
                 </struct>
            </value>
        </param>
</medthodCall>
ASKER CERTIFIED SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of NEComputer

ASKER

I am not catching on. can you explain step by step what is being done after the $context.
Thanks