Page 1 of 1

Problem to retrieve form data from XML page

Posted: Tue Oct 11, 2011 7:21 pm
by milfo
Hi,
I’ve got a problem to retrieve form data from Php page that produce an XML.
I’m trying to explain better.
I send form data from PageA to PageB, PageB is a PHP file that produce an XML output like this:
<response>
<status></status>
<message></ message >
<id_costumer/>
</response>

If the form field of pageA is inputted correctly, pageB return status “OK”, message “Thank you to fill our form”, and Id_costumers “autoincremented id example 123” and the output is in XML like above.
So, the problem is that the pageB is not on my server, how can I parse the Xml file and intercept the value of the above tag submitted by pageA?
If I parse the XML file with direttive include like this:

Code: Select all

<?php
include 'http://www.site.com/pageB.php';

$movies = new SimpleXMLElement($xmlstr);

…
?> 
it's seems doesn't work and I can’t to retrieve any form value of the pageA.
Please help me, I'm so frustrated, any suggestion will be appreciated.

Thanks
Ric

Re: Problem to retrieve form data from XML page

Posted: Wed Oct 12, 2011 11:13 am
by ouchiko
What the actual URL - SimpleXML does not handle xmlns namespaces very well.

Re: Problem to retrieve form data from XML page

Posted: Wed Oct 12, 2011 12:58 pm
by milfo
Would you like to know the exact page's URL?

Re: Problem to retrieve form data from XML page

Posted: Sat Oct 15, 2011 1:16 pm
by ouchiko
Well yeh, almost impossible to work out your problems without understanding what type of XML its loading..