Session is not working while Parsing SimpleXMLElement Object

Laura

New Member
I get one array, when i am parsing a xml file using xpath xquery.The array is this\[code\]Array ( [0] => SimpleXMLElement Object ( [userid] => 2 [username] => UserName [userpassword] => 40bd001563085fc35165329ea1ff5c5ecbdbbeef [usertype] => A [createdBy] => 1 ) )\[/code\]I want to store the userid in a session variale.I created this \[code\]if(!empty($nodes)){ foreach($nodes as $node) { $UserId=$node->userid; }}$_SESSION['UserId1']= $UserId; \[/code\]Inside the foreach the session is getting.But if i run the page again am getting \[code\]Warning: session_start() [function.session-start]: Node no longer exists\[/code\]and the session is not getting.Can anybody give a solution
 
Back
Top