SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question Newbie needing a few pointers for retreiving xml info into php page

    I'm fairly new to using XML with PHP so I'm looking for some guidance on this.
    Keen to learn how to get it to work but I need some pointers as to what I need to learn to get this working for my site please.

    I have a form which the user fills in and is then sent off to a URL which shows the relevant data in an xml format.
    The forms etc all works and the xml data that is subsequently shown is correct.

    Problem I have is I don't know how to pull the xml data into a page rather than the form submitting and then going to the raw xml file.
    I've had a look at some of the simple xml articles on sitepoint but I can't figure this out as I don't have the exact url of the xml file.

    I've saved the resulting xml file from one of the tests to try and figure out the different nodes etc in it but when I try to get this to work with simplexml_load_file I just get errors. I think it's because the xml file is not receiving the relevant form details but I have no idea how to fix this


    This is the code for the form, I've removed the username and password req to get the xml file to show correctly:

    HTML Code:
    <html>
    	<head>
    		<title>MXIN Proxy Test Page</title>
    	</head>
    	<body>
    		<form method="post" action="https://www.automotivemxin.com/UAT/">
    			<input type="hidden" name="ESERIES_FORM_ID" value="B2INT">
    			<input type="hidden" name="MXIN_USERNAME" value="USERNAME"><br />
    			<input type="hidden" name="MXIN_PASSWORD" value="PASSWORD"><br/>
    			Full Registration.<br /><input type="text" name="MXIN_VRM"><br />			
    			<input type="hidden" name="MXIN_TRANSACTIONTYPE" value="03"><br />
    			<input type="hidden" name="MXIN_PAYMENTCOLLECTIONTYPE" value="02"><br />
    			<input type="submit" />
    		</form>
    	</body>
    </html>
    I've attached a copy of the xml file I've saved as a .txt file incase this makes it easier to explain what I'm trying to do.

    Any help would be greatly appreciated with this.

    Thanks in advance

    data.txt

  2. #2
    SitePoint Addict
    Join Date
    Dec 2005
    Posts
    381
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've now worked out how to get a page to pull in the xml data via jquery but this only works when I actually have the xml file.
    I can't work out how I get this to work and get the form submission details to work.

    Anyone have any ideas?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •