Tag Archives: lessons

Lesson 10: Read The Data File

This example uses the [[READ_FILE]] shortcode to load the data into a variable for printing to the screen. Create a node and paste one of the following code samples into it’s landing page editor.  Goto the node’s address and test with browser. [[READ_FILE:comments.txt|content]] [[PRINT:content]] or [[INITIALIZE:filename|”comments.txt”]] [[READ_FILE:$filename|content]] [[PRINT:content]]

Lesson 07: Handling Form Data

If a script being executed has form data posted in it’s request headers, this data may be automatically assigned to variables using the [[POST]] shortcode. [[POST:First_Name]] [[POST:Last_Name]] Hello [[PRINT:First_Name]], [[PRINT:Last_Name]] To combine the form and the handler into the same script we may use the [[IF_SUBMITTED]]  with the [[ELSE]]  and [[END_IF]] shortcodes to add flow… Read More »

Lesson 03: Variable Computations

Variable computation example. Outputs: 3 Create a node and paste this following code into it’s landing page editor. Goto the node’s address and test with browser. [[INITIALIZE:var1|1+2]] [[PRINT:var1]] Note: To bring variables within the calculations, add a dollar sign before each. You may also use parenthesis for algebraic expression grouping. [[INITIALIZE:var1|2]] [[INITIALIZE:var2|4]] [[INITIALIZE:var3|$var1+$var2]] [[INITIALIZE:var4|$var3/2]] The… Read More »