Page 1 of 1

Retaining Variables from a form

Posted: Mon Oct 09, 2023 2:58 pm
by Starb7
Hi Pablo and all

Just tinkering with a form and pages. Basically, I have a page that lets people enter a name and select 3 items from a pop-up menu. When this click 'Submit' the form process the info and I have got [X] Process VAriables in Success page so that I can use $variable1, $variable2, $variable3 and $variable4 in the page as; Hello $variable1, you chose $variable2, $variable3 and $variable4 and all of that works just fine.

My query is how to I retain that variable info to use on another page within the site?

TIA
Paul

Re: Retaining Variables from a form

Posted: Mon Oct 09, 2023 3:12 pm
by Pablo
In PHP, variables are only valid on the same page.
If you want to transfer the data to another page then you will have to store the value in a cookie or session variable.
Note that this is not specific to WYSIWYG Web Builder.

Re: Retaining Variables from a form

Posted: Mon Oct 09, 2023 3:13 pm
by Starb7
Okidoke, Cheers