How to transfer value from one page to another? Octobercms

- 1 answer

Ad

My project required to use octobercms, but i have no background knowledge. I need to create a page which you type a value and transfer the value to another page in the iframe.

The first page contain a iframe that link to second page. After type the value and click a button in the first page, the value is transfer to second page in the iframe, the iframe pop out and show the second page with a answer.

Is it possible to use twig or php as medium, then transfer to the second page?

I need some guidelines to start working. I can't use components or plugin and i don't have the know-how to do this.

There isn't a tutorial to show how to create a page that transfer data to another. If there is any, can you link me to it? If the question is impossible to do, can you show me the correct way to do it?

Ad

Answer

Ad

If I understand your question, you are looking for sessions.

OctoberCMS is based on Laravel framework and Laravel provides a Session service that you can use into your October application.

If you aren't familiar with plugins or components, you may use the PHP code section of the pages.

Page 1:

\Session::put('key', 'value');

Page 2:

$value = \Session::get('key');
Ad
source: stackoverflow.com
Ad