How do I use php sessions in XSLT for example for making a shopping cart for a webshop?
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’.
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 withFor example…
PHP:
XSL: