Custom php code in stacks, using session variables in stacks forms

(Eduardo Moreno) #1

Does anybody know how to include php code in stacks, for example to display session variables, and how to include session variables values into form fields ?

Many thanks in advance


(Isaiah Carew) #2

there are a number of ways, but the simplest is to add an HTML stack and put your php in there. remember to rename the page with a “.php” extension so that your web server will process the php inside of it.

other ways:

Stacks works very much like other parts of RapidWeaver. A Text stack works just like a Styled Text page. If you want to add php to a Styled Text page (or Text stack) you can add the php, select it, and choose the menu option: Format > Ignore Formatting

HTML Stacks work just like HTML pages – and should except php too.

And Markdown Stacks and Markdown pages are really just accept all HTML too – so they’ll work with php too.