How to use php sessions in xslt?

If you're using XSLT from within PHP, you can pass parameters to it by XSLTProcessor::setParameter() . You'll have to declare that parameter in XSL with.

Up vote 1 down vote favorite 1 share g+ share fb share tw.

A user can browse the site and click "Add to cart" on several items. Each item should then be stored in a session variable. The user can at all time view the items selected by clicking "View cart".

Php xslt session link|improve this question edited Mar 13 '09 at 12:35 asked Mar 13 '09 at 11:41jorgen128214 67% accept rate.

Creating a shopping cart is rather generic... – Daniel Rikowski Mar 13 '09 at 11:53 Really unsure what you are trying to achieve. Do you want the XML data in the session? (Why would you do this?

) – strager Mar 13 '09 at 12:38.

If you're using XSLT from within PHP, you can pass parameters to it by XSLTProcessor::setParameter(). You'll have to declare that parameter in XSL with For example... PHP: // $xsl, $xml -- DOMDocument objects $proc = new XSLTProcessor; $proc->importStyleSheet($xsl); $proc->setParameter(''/*default namespace*/, 'test_param', $aValue); $proc->setParameter('', 'session_name', session_name()); $proc->setParameter('', 'session_id', session_id()); echo $proc->transformToXML($xml); XSL: Your test parameter is: Your session name is: Your session ID is: Link with session.

I will try this! Thank you! – jorgen Mar 13 '09 at 12:36.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions