CF8 unset a var

pimh 1d ago

Hi Max, 

I need to unset a var value that has been set in the form. However the problem is that when I do this in php code (within a load page), the variable seems to be gone (not visible in the debug). Nevertheless it still does exist somehow. So next time the page is loaded the value is still found via isset.

Attached an example that shows the issue. 

3 pages on page 2 if never visited the variable is being set with a timestamp. On another visit to page 2, it checks again and the value does exist. This will redirect to page 1 and reset the variable. So now when getting to page 2 is should not exist and the action should be as the first time value set, no redirect to the first page. Nevertheless the value does still exist and the page is redirected back. 

This is a small example of part of my form in which I try to monitor activity. If no activity for a while I should go back to the first page starting over again. This to prevent effects of leaving a screen unattended and people miss-using this. 

I am also open to other solutions. In this example the redirect does work, but also the next-page refuring back to page1 doesn't do a thing. This was also one of my other questions. 

Hope you can figure it out and help to get past this issue. 

Kind regards, Pim 

Private Attachment is only visible to Author & Moderators
You need to login to be able to post a reply.