#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2001
    Location
    Bournemouth, England
    Posts
    28
    Rep Power
    0

    Talking


    Hiya,

    I'm currently writing an ecommerce site and the bank we're using wants the credit card transactions sent in an XML file (Boo!)

    I write c, c++, java, sql, html, 68000 assembly, javascript and php but I've never tried XML (it doesn't look too complicated tho I could be wrong)

    So far I've tried to write a little test file that's a mix of xml and php (all the data is in php variables) but it doesn't flippin' work :-(

    If I call the file myFile.xml, all the xml comes out ok but the php is typed out exactly as I typed it in. If it's myFile.php I get a parse error on line 1 where it's still just xml.

    Can anyone tell me how to do this? It's driving me mad.

    Thanx
    mitchell xx
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    29
    Rep Power
    0
    It is because your Web Server isn't parsing a .xml file for PHP code and when it parses your .php file it is trying to read your XML as php, what you need to do is use echo to make the XML, as you would if you were making HTML.

IMN logo majestic logo threadwatch logo seochat tools logo