Osclass forums
Development => Development => Topic started by: WEBmods on June 26, 2019, 01:34:04 am
-
Hello!
I have a plugin that saves data in the session like this:
<?php
Session::newInstance()->_setForm('ur-review', Params::getParam('review'));
Session::newInstance()->_keepForm('ur-review');
?>
The session values are used to show them back on the form if an error occurs while verifying the data user submitted.
That part works, but in case I visit the same site again the values from the previous post are still in the form.
So how can I clear those session values?
Thanks, regards.
-
Been looking at the wrong place...
Session::newInstance()->_dropKeepForm(); // ALL form values.
Session::newInstance()->_dropKeepForm($key); // SPECIFIC form value.
Regards.