Im trying to create an XML file from the input of a form. It works fine. But then, I wanted to add to the file data from session variables. It's something like this:

PHP Code:
$stat $doc->createElement('status');
$stext $doc->createTextNode($_POST['status']);

$useridConversion $_SESSION['userid'];

$userid $doc->createElement('userid');
$useridtext $doc->createTextNode($useridConversion);
The status part works very well, but when I want to add information from a $_SESSION variable it gives me that error. I did the conversion because it wouldn't let me do it straight from the $_SESSION variable so then I try to convert it to a string and it doesnt work either.

Any suggestions?

Thanks in advance,