Problem with PHP and XML

Discussion in 'PHP' started by Dimension, Mar 8, 2008.

  1. #1
    I have a problem with XML.

    I have a file where I make an SQL statement, then make up an XML document in PHP, passing into the XML elements values from the database.

    The SQL statement contains a session variable which is required to narrow down the results in the database.

    On another page I use SimpleXmlElement to read the file in and try to return something using $xml->item[0]...

    I have narrowed the problem down to being a problem with the session because if I insert plain text into the SQL in place of the session, data is returned.

    I have tried various methods but nothing seems to work. Is there a way around this at all?
     
    Dimension, Mar 8, 2008 IP