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