NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Sending php vars with serializeenvelope function


Joined: 29 Jun 2006
Posts: 5
Reply with quote
Hi

i have this php code:
Code:

$departure = $_POST['departureloc'];

$mysoapmsg = $client->serializeEnvelope('<function xmlns="http://function.com/">
       <inUID>username</inUID>
        <inPWD>password</inPWD>
        <inDeparture>$departure</inDeparture>
    </function>','',array(),'document', 'literal');

suffice to say, ive changed a few fields for the purpose of the post.

Now, it all works fine if I have a static entry in the <inDeparture> field. However, when I put a variable into it, it doesn't work for love nor money.

Does anyone know why this happens and/or if there is a way to make it work?

Thanks in advance.

EDIT

Fixed, I had to continue the var, with ' . $departure . '
View user's profileFind all posts by dmmrsSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8342
Reply with quote
variables are not recognized by php if they are in single quotes. Try doubled ones " " vs ' '.
View user's profileFind all posts by dmitriSend private messageVisit poster's website
Sending php vars with serializeenvelope function
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic