Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In PHP, you can store data into the Session memory for later use. This allows you to parse the CSV file only once, save it in the Session memory and use this object in all of the later steps.</p> <p>See <a href="http://www.tizag.com/phpT/phpsessions.php" rel="nofollow">http://www.tizag.com/phpT/phpsessions.php</a> for a small tutorial.</p> <p>Let me explain a bit more. Every time a web browser requests a page from the server, PHP executes the PHP script associated with the web page. It then sends the output to the user. This is inherently stateless: the user requests something, you give something back -> end of transaction.</p> <p>Sometimes, you may want to remember something you calculated in your PHP script and use it the next time the page is requested. This is <strong>stateful</strong>, you want to save state across different web requests.</p> <p>One way is to save this result in the database or in a flat file. You could even add an identifier for the currently connected user, so you use a per-user file or save the current user in your database.</p> <p>You could also use a hidden form and save all of the data as hidden input fields. When the user presses "Next", the hidden input fields are sent back to the PHP script.</p> <p>This is all very clumsy. There is a better way: session memory. This is a piece of memory that you can access, which is saved across different PHP calls. It is perfect for saving temporary state information like this. The session memory can be indexed per application user.</p> <p>Please note that there are frameworks that take this a lot further. Java SEAM has an APPLICATION memory, a SESSION memory, a CONVERSATION memory, a PAGE memory and even a single EVENT memory.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload